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 { return {
'neovim/nvim-lspconfig', 'neovim/nvim-lspconfig',
dependencies = { dependencies = {
@ -35,26 +74,7 @@ return {
require('mason').setup() require('mason').setup()
require('mason-lspconfig').setup({ require('mason-lspconfig').setup({
automatic_installation = false, automatic_installation = false,
ensure_installed = { ensure_installed = 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
},
handlers = { handlers = {
-- Default handler, sets up everything unless a custom language server -- Default handler, sets up everything unless a custom language server