fix: apply config to lua_ls

lsp server name changed?
This commit is contained in:
fiplox 2023-02-21 21:49:55 +01:00
parent e8ddd9a505
commit 7b3e5b633f

View File

@ -40,7 +40,7 @@ function M.config()
local on_attach = function(client, bufnr)
--[[ vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') ]]
lsp_keymaps(bufnr)
if client.name == 'sumneko_lua' then
if client.name == 'sumneko_lua' or client.name == 'lua_ls' then
client.server_capabilities.documentFormattingProvider = false
end
if client.name == 'clangd' then
@ -84,7 +84,7 @@ function M.config()
capabilities = capabilities,
}
if server == 'sumneko_lua' then
if server == 'sumneko_lua' or server == 'lua_ls' then
local sumneko_opts = require 'plugins.lsp.settings.sumneko_lua'
opts = vim.tbl_deep_extend('force', sumneko_opts, opts)
end