VimPlugin: lsp: Difference between revisions
From wikinotes
(4 intermediate revisions by the same user not shown) | |||
Line 34: | Line 34: | ||
</blockquote><!-- Mason --> | </blockquote><!-- Mason --> | ||
</blockquote><!-- Language Install --> | </blockquote><!-- Language Install --> | ||
== Disable Inline Linter Errors == | |||
<blockquote> | |||
<syntaxhighlight lang="lua"> | |||
# neovim 6+ | |||
vim.diagnostic.config({virtual_text = false}) | |||
# old way | |||
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with( | |||
vim.lsp.diagnostic.on_publish_diagnostics, { | |||
virtual_text = false | |||
} | |||
) | |||
</syntaxhighlight> | |||
</blockquote><!-- Disable Inline Messages --> | |||
Note that [[VimPlugin: Ale]] also has inline diagnostics. | |||
</blockquote><!-- Configuration --> | </blockquote><!-- Configuration --> |
Latest revision as of 23:22, 6 February 2023
Neovim's builtin lsp client.
Documentation
:h lsp
https://neovim.io/doc/user/lsp.html avail lsp's https://microsoft.github.io/language-server-protocol/implementors/servers/
Configuration
Language Install
Vanilla
- install an lsp using your OS (ex.
pacman -S gopls
- enable lsp (ex.
lua require('lspconfig').gopls.setup{on_attach = custom_lsp_attach}
)lspconfig
VimPlugin: nvim-lspconfig contains several pre-made LSP configurations.
You'll still need to install the LSP provider.Mason
VimPlugin: mason can automate installing LSPs.
Use the:Mason
command to see installed.Disable Inline Linter Errors
# neovim 6+ vim.diagnostic.config({virtual_text = false}) # old way vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with( vim.lsp.diagnostic.on_publish_diagnostics, { virtual_text = false } )Note that VimPlugin: Ale also has inline diagnostics.