Cleanup completion plugins configuration
This commit is contained in:
parent
95d8c16621
commit
ee385eb5da
@ -1,54 +1,3 @@
|
||||
-- Language servers
|
||||
local ensure_installed = {
|
||||
'clangd', -- C/C++
|
||||
'lua_ls', -- Lua
|
||||
'opencl_ls', -- OpenCL
|
||||
'harper_ls', -- Spelling & grammar
|
||||
'marksman', -- Markdown
|
||||
'tinymist', -- Typst
|
||||
}
|
||||
|
||||
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', -- Python
|
||||
}
|
||||
for _, package in ipairs(ensure_install_from_pip) do
|
||||
table.insert(ensure_installed, package)
|
||||
end
|
||||
end
|
||||
|
||||
if vim.fn.executable('go') == 1 then
|
||||
local ensure_installed_from_go = {
|
||||
'gopls', -- Go
|
||||
}
|
||||
for _, package in ipairs(ensure_installed_from_go) 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 = {
|
||||
@ -131,9 +80,48 @@ return {
|
||||
end
|
||||
|
||||
require('mason').setup()
|
||||
|
||||
local language_servers = {
|
||||
'clangd', -- C/C++
|
||||
'lua_ls', -- Lua
|
||||
'opencl_ls', -- OpenCL
|
||||
'harper_ls', -- Spelling & grammar
|
||||
'marksman', -- Markdown
|
||||
'tinymist', -- Typst
|
||||
}
|
||||
|
||||
if vim.fn.executable('npm') == 1 then
|
||||
for _, package in ipairs({
|
||||
'ansiblels', -- Ansible
|
||||
'bashls', -- Bash
|
||||
'docker_compose_language_service', -- Docker Compose
|
||||
'dockerls', -- Dockerfile
|
||||
'html', -- HTML
|
||||
'jsonls', -- JSON
|
||||
'pyright', -- Python
|
||||
'vimls', -- VimScript
|
||||
'yamlls', -- YAML
|
||||
}) do table.insert(language_servers, package) end
|
||||
end
|
||||
|
||||
if vim.fn.executable('pip') == 1 then
|
||||
for _, package in ipairs({
|
||||
'cmake', -- CMake
|
||||
'esbonio', -- Sphinx
|
||||
'ruff', -- Python
|
||||
}) do table.insert(language_servers, package) end
|
||||
end
|
||||
|
||||
if vim.fn.executable('go') == 1 then
|
||||
table.insert(language_servers, 'gopls') -- Go
|
||||
end
|
||||
|
||||
if vim.fn.has('win32') == 1 then
|
||||
table.insert(language_servers, 'powershell_es') -- PowerShell
|
||||
end
|
||||
|
||||
require('mason-lspconfig').setup({
|
||||
automatic_enable = true,
|
||||
ensure_installed = ensure_installed,
|
||||
ensure_installed = language_servers,
|
||||
})
|
||||
|
||||
-- (Dis|en)able harper-ls when spell mode is (dis|en)enabled.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user