Compare commits

...

3 Commits

View File

@ -1,3 +1,42 @@
-- Language servers
local ensure_installed = {
'clangd', -- C/C++
'lua_ls', -- Lua
'opencl_ls', -- OpenCL
}
if vim.fn.executable('npm') == 1 then
local ensure_install_from_npm = {
'ansiblels', -- Ansible
'bashls', -- Bash
'docker_compose_language_service', -- Docker Compose
'dockerls', -- Dockerfile
'html', -- HTML
'jsonls', -- JSON
'pyright', -- Python
'vimls', -- VimScript
'yamlls', -- YAML
}
for _, package in ipairs(ensure_install_from_npm) do
table.insert(ensure_installed, package)
end
end
if vim.fn.executable('pip') == 1 then
local ensure_install_from_pip = {
'cmake', -- CMake
'esbonio', -- Sphinx
'ruff_lsp', -- Python
}
for _, package in ipairs(ensure_install_from_pip) do
table.insert(ensure_installed, package)
end
end
if vim.fn.has('win32') == 1 then
table.insert(ensure_installed, 'powershell_es')
end
return {
'neovim/nvim-lspconfig',
dependencies = {
@ -35,26 +74,7 @@ return {
require('mason').setup()
require('mason-lspconfig').setup({
automatic_installation = false,
ensure_installed = {
-- Language servers
'ansiblels', -- Ansible
'bashls', -- Bash
'clangd', -- C/C++
'cmake', -- CMake
'docker_compose_language_service', -- Docker Compose
'dockerls', -- Dockerfile
'esbonio', -- Sphinx
'html', -- HTML
'jsonls', -- JSON
'lemminx', -- XML
'lua_ls', -- Lua
'opencl_ls', -- OpenCL
'powershell_es', -- Powershell
'pyright', -- Python
'ruff_lsp', -- Python
'vimls', -- VimScript
'yamlls', -- YAML
},
ensure_installed = ensure_installed,
handlers = {
-- Default handler, sets up everything unless a custom language server