Reorder lsp config

This commit is contained in:
Rendo 2026-10-20 22:35:27 +05:00
commit d9b499f942

View file

@ -12,31 +12,17 @@ vim.lsp.config('lua_ls', {
client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, { client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
runtime = { runtime = {
-- Tell the language server which version of Lua you're using (most
-- likely LuaJIT in the case of Neovim)
version = 'LuaJIT', version = 'LuaJIT',
-- Tell the language server how to find Lua modules same way as Neovim
-- (see `:h lua-module-load`)
path = { path = {
'lua/?.lua', 'lua/?.lua',
'lua/?/init.lua', 'lua/?/init.lua',
}, },
}, },
-- Make the server aware of Neovim runtime files
workspace = { workspace = {
checkThirdParty = false, checkThirdParty = false,
library = { library = {
vim.env.VIMRUNTIME, vim.env.VIMRUNTIME,
-- Depending on the usage, you might want to add additional paths
-- here.
-- '${3rd}/luv/library',
-- '${3rd}/busted/library',
}, },
-- Or pull in all of 'runtimepath'.
-- NOTE: this is a lot slower and will cause issues when working on
-- your own configuration.
-- See https://github.com/neovim/nvim-lspconfig/issues/3189
-- library = vim.api.nvim_get_runtime_file('', true),
}, },
}) })
end, end,
@ -55,8 +41,6 @@ vim.lsp.config('rust_analyzer', {
} }
}) })
vim.lsp.enable({'clangd','lua_ls','rust_analyzer','mesonlsp','cmake','omnisharp','pyright','gopls','ols'})
--Enable (broadcasting) snippet capability for completion
local capabilities = vim.lsp.protocol.make_client_capabilities() local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true capabilities.textDocument.completion.completionItem.snippetSupport = true
@ -64,3 +48,4 @@ vim.lsp.config('neocmake', {
capabilities = capabilities, capabilities = capabilities,
}) })
vim.lsp.enable({'clangd','lua_ls','rust_analyzer','mesonlsp','cmake','omnisharp','pyright','gopls','ols'})