refactor : separate lspconfig setups
This commit is contained in:
parent
0b55d45845
commit
1756c92609
4 changed files with 35 additions and 42 deletions
|
@ -57,21 +57,6 @@ capabilities.textDocument.completion.completionItem.resolveSupport = {
|
|||
},
|
||||
}
|
||||
|
||||
local servers = require("core.utils").load_config().plugins.options.lspconfig.servers
|
||||
|
||||
for _, lsp in ipairs(servers) do
|
||||
nvim_lsp[lsp].setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
-- root_dir = vim.loop.cwd,
|
||||
flags = {
|
||||
debounce_text_changes = 150,
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
-- require("anyfile").setup_luaLsp(on_attach, capabilities) -- this will be removed soon after the custom hooks PR
|
||||
|
||||
-- replace the default lsp diagnostic symbols
|
||||
local function lspSymbol(name, icon)
|
||||
vim.fn.sign_define("LspDiagnosticsSign" .. name, { text = icon, numhl = "LspDiagnosticsDefault" .. name })
|
||||
|
@ -113,3 +98,11 @@ vim.notify = function(msg, log_level, _opts)
|
|||
vim.api.nvim_echo({ { msg } }, true, {})
|
||||
end
|
||||
end
|
||||
|
||||
-- requires a file containing user's lspconfigs
|
||||
|
||||
local addlsp_confs = require("core.utils").load_config().plugins.options.lspconfig.setup_lspconf
|
||||
|
||||
if string.len(addlsp_confs) ~= 0 then
|
||||
require(addlsp_confs).setup_lsp(on_attach, capabilities)
|
||||
end
|
||||
|
|
|
@ -11,7 +11,7 @@ vim.o.termguicolors = true
|
|||
|
||||
g.nvim_tree_add_trailing = 0 -- append a trailing slash to folder names
|
||||
g.nvim_tree_git_hl = git_status
|
||||
g.nvim_tree_gitignore = git_status
|
||||
g.nvim_tree_gitignore = 0
|
||||
g.nvim_tree_hide_dotfiles = 0
|
||||
g.nvim_tree_highlight_opened_files = 0
|
||||
g.nvim_tree_indent_markers = 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue