fix: apply config to lua_ls
lsp server name changed?
This commit is contained in:
parent
e8ddd9a505
commit
7b3e5b633f
@ -40,7 +40,7 @@ function M.config()
|
|||||||
local on_attach = function(client, bufnr)
|
local on_attach = function(client, bufnr)
|
||||||
--[[ vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') ]]
|
--[[ vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') ]]
|
||||||
lsp_keymaps(bufnr)
|
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
|
client.server_capabilities.documentFormattingProvider = false
|
||||||
end
|
end
|
||||||
if client.name == 'clangd' then
|
if client.name == 'clangd' then
|
||||||
@ -84,7 +84,7 @@ function M.config()
|
|||||||
capabilities = capabilities,
|
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'
|
local sumneko_opts = require 'plugins.lsp.settings.sumneko_lua'
|
||||||
opts = vim.tbl_deep_extend('force', sumneko_opts, opts)
|
opts = vim.tbl_deep_extend('force', sumneko_opts, opts)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user