allow skip lsp clients setup

neovim_0.6^2
ray-x 2 years ago
parent 516d643ffe
commit f8985d7aa2

@ -269,6 +269,8 @@ require'navigator'.setup({
},
lsp_installer = false, -- set to true if you would like use the lsp installed by williamboman/nvim-lsp-installer
lsp = {
enable = true, -- skip lsp setup if disabled make sure add require('navigator.lspclient.mapping').setup() in you
-- own on_attach
code_action = {enable = true, sign = true, sign_priority = 40, virtual_text = true},
code_lens_action = {enable = true, sign = true, sign_priority = 40, virtual_text = true},
format_on_save = true, -- set to false to disable lsp code format on save (if you are using prettier/efm/formater etc)

@ -34,6 +34,7 @@ _NgConfigValues = {
signature_help_cfg = { debug = false }, -- if you would like to init ray-x/lsp_signature plugin in navigator, pass in signature help
ctags = { cmd = 'ctags', tagfile = '.tags' },
lsp = {
enable = true, -- if disabled make sure add require('navigator.lspclient.mapping').setup() in you on_attach
code_action = {
enable = true,
sign = true,
@ -185,7 +186,7 @@ local extend_config = function(opts)
if key == 'lsp' then
local lsp = require('navigator.lspclient.clients').lsp
if not vim.tbl_contains(lsp or {}, k) and k ~= 'efm' and k ~= 'null-ls' then
info(string.format('[] extend LSP support for %s ', k))
info(string.format('[] extend LSP support for %s %s ', key, k))
end
elseif key == 'keymaps' then
info('keymap override')
@ -228,7 +229,9 @@ M.setup = function(cfg)
require('navigator.implementation')
cfg.lsp = cfg.lsp or _NgConfigValues.lsp
require('navigator.diagnostics').config(cfg.lsp.diagnostic)
if cfg.lsp.enable then
require('navigator.diagnostics').config(cfg.lsp.diagnostic)
end
if not _NgConfigValues.loaded then
_NgConfigValues.loaded = true
end

Loading…
Cancel
Save