Coc.nvim language servers: Difference between revisions
From wikinotes
(→Custom) |
|||
Line 52: | Line 52: | ||
} | } | ||
</source> | </source> | ||
=== sorbet === | |||
<blockquote> | |||
<syntaxhighlight lang="jsonc"> | |||
// ~/.config/nvim/coc-settings.json | |||
{ | |||
"languageserver": { | |||
"sorbet": { | |||
"command": "bundle", | |||
"args": ["exec", "srb", "tc", "--lsp"], | |||
"filetypes": ["ruby"] | |||
} | |||
} | |||
} | |||
</syntaxhighlight> | |||
</blockquote><!-- sorbet --> | |||
</blockquote><!-- Custom --> | </blockquote><!-- Custom --> | ||
</blockquote><!-- Language Servers --> | </blockquote><!-- Language Servers --> |
Revision as of 15:24, 28 December 2021
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.
You may install them dynamically with
:CocInstall coc-python
and sometimes automatically likePlug 'neoclide/coc-tsserver', {'do': 'yarn install --frozen-lockfile'}
.
python unmaintained coc-python active coc-pyright sh, bash active coc-sh ruby active, ruby/rails coc-solargraph graphql active coc-graphql 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
// ~/.config/nvim/coc-settings.json { "languageserver": { "sorbet": { "command": "bundle", "args": ["exec", "srb", "tc", "--lsp"], "filetypes": ["ruby"] } } }