diff --git a/after/ftplugin/scala.vim b/after/ftplugin/scala.vim index 5269530..241e3fa 100644 --- a/after/ftplugin/scala.vim +++ b/after/ftplugin/scala.vim @@ -3,4 +3,14 @@ noremap f :Autoformat imap //< (codelines-close) map cl :call jobstart(['codelines', '.']) +nnoremap K :call show_documentation() + +function! s:show_documentation() + if (index(['vim','help'], &filetype) >= 0) + execute 'h '.expand('') + else + call CocAction('doHover') + endif +endfunction + au BufWritePost *.scala Neomake! diff --git a/after/plugin/coc.vim b/after/plugin/coc.vim index 6fbd5ec..fefda94 100644 --- a/after/plugin/coc.vim +++ b/after/plugin/coc.vim @@ -15,4 +15,3 @@ vmap (coc-codeaction-selected) omap af (coc-funcobj-a) omap if (coc-funcobj-i) - diff --git a/coc-settings.json b/coc-settings.json deleted file mode 100644 index 17fd15c..0000000 --- a/coc-settings.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "languageserver": { - "dotty": { - "command": "run-dotty-lsp", - "rootPatterns": ["build.sbt"], - "filetypes": ["scala", "sbt"] - } - } -}