Coc.nvim language servers: Difference between revisions
From wikinotes
(3 intermediate revisions by the same user not shown) | |||
Line 20: | Line 20: | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |||
!colspan=2| vim snippets | |||
|- | |||
| active || [[coc-snippets]] | |||
|- | |- | ||
!colspan=2| python | !colspan=2| python | ||
Line 38: | Line 42: | ||
|- | |- | ||
| active || [[coc-graphql]] | | active || [[coc-graphql]] | ||
|- | |||
!colspan=2| go | |||
|- | |||
| active || [[coc-go]] | |||
|- | |- | ||
|} | |} |
Latest revision as of 20:17, 22 July 2022
COC exposes language servers to vim, you'll need them to perform completion etc.
You can have multiple language-servers running at once on the same language/file (ex: ruby solargraph+sorbet).
Language Servers
Extensions
Language Servers may have a wrapper built for COC. These are called extensions.
They can be installed in a variety of ways:" configured (install if not present) let g:coc_global_extensions = ["coc-json", "coc-pyright", "coc-solargraph"] " interactive :CocInstall coc-python
vim snippets active coc-snippets python unmaintained coc-python active coc-pyright sh, bash active coc-sh ruby active, ruby/rails coc-solargraph graphql active coc-graphql go active coc-go Custom
Some programs may be able to function as an LSP, and can be registered to do so.
see https://github.com/neoclide/coc.nvim/wiki/Language-servers#register-custom-language-servers{ "languageserver": { "sorbet": { "command": "srb", "args": ["tc", "--lsp"], "filetypes": ["ruby"] } } }sorbet
Shows type info in docs, very accurate completion.
// ~/.config/nvim/coc-settings.json { "languageserver": { "sorbet": { "command": "bundle", "args": ["exec", "srb", "tc", "--lsp"], "filetypes": ["ruby"] } } }