Add coc.vim settings

This commit is contained in:
Alexander Gehrke 2019-12-25 00:22:35 +01:00
parent 8d179a0868
commit 9d481edb14
2 changed files with 27 additions and 0 deletions

18
after/plugin/coc.vim Normal file
View file

@ -0,0 +1,18 @@
map <silent> gd <Plug>(coc-definition)
map <silent> <M-=> :call CocAction("doHover")<cr>
map <silent> <Leader>t <Plug>(coc-type-definition)
map <silent> <Leader>u <Plug>(coc-references)
map <silent> <Leader>r <Plug>(coc-rename)
map <silent> <Leader>q <Plug>(coc-quickfix)
map <silent> <Leader>F <Plug>(coc-format)
map <silent> <Leader>f <Plug>(coc-format-selected)
vmap <silent> <Leader>f <Plug>(coc-format-selected)
map <silent> <M-a> <Plug>(coc-codeaction)
vmap <silent> <M-a> <Plug>(coc-codeaction-selected)
omap <silent> af <Plug>(coc-funcobj-a)
omap <silent> if <Plug>(coc-funcobj-i)

9
coc-settings.json Normal file
View file

@ -0,0 +1,9 @@
{
"languageserver": {
"dotty": {
"command": "run-dotty-lsp",
"rootPatterns": ["build.sbt"],
"filetypes": ["scala", "sbt"]
}
}
}