1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 17:40:06 +08:00

fix(lsp): fix lsp command setting

This commit is contained in:
wsdjeg 2022-06-12 23:39:40 +08:00
parent f8dc9c33a7
commit cd99fa7242

View File

@ -91,19 +91,19 @@ end
-- Use a loop to conveniently call 'setup' on multiple servers and -- Use a loop to conveniently call 'setup' on multiple servers and
-- map buffer local keybindings when the language server attaches -- map buffer local keybindings when the language server attaches
local override_client_cmds = require('spacevim').eval('s:override_client_cmds') local servers = require('spacevim').eval('s:enabled_clients')
for client, override_cmd in pairs(override_client_cmds) do for _, lsp in ipairs(servers) do
nvim_lsp[client].setup { nvim_lsp[lsp].setup {
cmd = override_cmd,
on_attach = on_attach, on_attach = on_attach,
flags = { flags = {
debounce_text_changes = 150, debounce_text_changes = 150,
} }
} }
end end
local servers = require('spacevim').eval('s:enabled_clients') local override_client_cmds = require('spacevim').eval('s:override_client_cmds')
for _, lsp in ipairs(servers) do for client, override_cmd in pairs(override_client_cmds) do
nvim_lsp[lsp].setup { nvim_lsp[client].setup {
cmd = override_cmd,
on_attach = on_attach, on_attach = on_attach,
flags = { flags = {
debounce_text_changes = 150, debounce_text_changes = 150,