-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Installing language servers
Michael Lingelbach edited this page Apr 28, 2022
·
18 revisions
The installation instructions for each server are in server_configurations.md. For the vast majority of servers, this is a one-time, one-line installation (npm i -g pyright
, dnf install clang-tools-extra
, brew install lua-language-server
, etc.).
It is preferred to use your system package manager if possible, as this will handle automatic updates for you.
Use nvim-lsp-installer. After adding both lspconfig and nvim-lsp-installer
to your packages, the integration is seamless.
require("nvim-lsp-installer").setup{}
require('lspconfig').pyright.setup {}
Then run :LspInstall pyright
, and pyright should now be available.
If you want to ensure servers are always installed:
local servers = { "sumneko_lua", "rust_analyzer" },
require("nvim-lsp-installer").setup {
ensure_installed = servers
}
for _, server in ipairs(servers) do
require('lspconfig')[server].setup {}
end
footer