Clean up lsp config

This commit is contained in:
ViViDboarder 2022-10-25 09:39:32 -07:00
parent d20e4a2645
commit 9c8c290f84

View File

@ -172,30 +172,6 @@ local function merged_capabilities()
return capabilities return capabilities
end end
--[[
local function get_luadev_config()
local neodev = utils.try_require("neodev")
if neodev ~= nil then
return neodev.setup({
-- add any options here, or leave empty to use the default settings
lspconfig = {
on_attach = get_default_attach(),
settings = {
Lua = {
completion = {
callSnippet = "Disable",
keywordSnippet = "Disable",
},
},
},
},
})
end
return { settings = nil }
end
--]]
function M.config_lsp() function M.config_lsp()
utils.try_require("lspconfig", function(lsp_config) utils.try_require("lspconfig", function(lsp_config)
local capabilities = merged_capabilities() local capabilities = merged_capabilities()
@ -206,7 +182,6 @@ function M.config_lsp()
lsp_config.bashls.setup(default_setup) lsp_config.bashls.setup(default_setup)
lsp_config.gopls.setup(default_setup) lsp_config.gopls.setup(default_setup)
lsp_config.pyright.setup(default_setup) lsp_config.pyright.setup(default_setup)
-- lsp_config.tsserver.setup(default_setup)
lsp_config.rls.setup({ lsp_config.rls.setup({
capabilities = capabilities, capabilities = capabilities,
on_attach = default_attach, on_attach = default_attach,
@ -223,13 +198,6 @@ function M.config_lsp()
utils.try_require("neodev", function(neodev) utils.try_require("neodev", function(neodev)
neodev.setup({}) neodev.setup({})
end) end)
--[[
lsp_config.sumneko_lua.setup({
capabilities = capabilities,
on_attach = default_attach,
-- settings = get_luadev_config().settings,
})
--]]
-- Auto setup mason installed servers -- Auto setup mason installed servers
utils.try_require("mason-lspconfig", function(mason_lspconfig) utils.try_require("mason-lspconfig", function(mason_lspconfig)
@ -250,22 +218,6 @@ function M.config_lsp()
end) end)
end end
function M.config_lsp_saga()
utils.try_require("lspsaga", function(saga)
saga.init_lsp_saga({
error_sign = utils.diagnostic_signs.Error,
warn_sign = utils.diagnostic_signs.Warn,
hint_sign = utils.diagnostic_signs.Hint,
dianostic_header_icon = " 💬 ",
code_action_icon = "💡",
code_action_prompt = {
enable = false,
sign = false,
},
})
end)
end
function M.config_lsp_intaller() function M.config_lsp_intaller()
utils.try_require("mason", function(mason) utils.try_require("mason", function(mason)
mason.setup() mason.setup()