issue #287 diagnostic setup is hard coded

pull/289/head
ray-x 7 months ago
parent 3f0c3d75c3
commit 354fb64b42

@ -1,4 +1,4 @@
# Navigator
12 require('nvim-autopairs').setup{
- Source code analysis and navigate tool
@ -315,6 +315,14 @@ require'navigator'.setup({
underline = true,
virtual_text = true, -- show virtual for diagnostic message
update_in_insert = false, -- update diagnostic message in insert mode
float = { -- setup for floating windows style
focusable = false,
sytle = 'minimal',
border = 'rounded',
source = 'always',
header = '',
prefix = '',
},
},
hover = {
@ -337,6 +345,7 @@ require'navigator'.setup({
diagnostic_virtual_text = true, -- show virtual for diagnostic message
diagnostic_update_in_insert = false, -- update diagnostic message in insert mode
display_diagnostic_qf = true, -- always show quickfix if there are diagnostic errors, set to false if you want to ignore it
-- set to 'trouble' to show diagnositcs in Trouble
tsserver = {
filetypes = {'typescript'} -- disable javascript etc,
-- set to {} to disable the lspclient for all filetypes

@ -311,6 +311,14 @@ Nondefault configuration example:
underline = true,
virtual_text = true, -- show virtual for diagnostic message
update_in_insert = false, -- update diagnostic message in insert mode
float = {
focusable = false,
style = 'minimal',
border = 'rounded',
source = 'always',
header = '',
prefix = '',
}
},
diagnostic_scrollbar_sign = {'▃', '▆', '█'}, -- experimental: diagnostic status in scroll bar area; set to false to disable the diagnostic sign,
-- for other style, set to {'╍', 'ﮆ'} or {'-', '='}

@ -75,6 +75,14 @@ _NgConfigValues = {
virtual_text = { spacing = 3, source = true }, -- show virtual for diagnostic message
update_in_insert = false, -- update diagnostic message in insert mode
severity_sort = { reverse = true },
float = {
focusable = false,
sytle = 'minimal',
border = 'rounded',
source = 'always',
header = '',
prefix = '',
},
},
definition = { enable = true },
call_hierarchy = { enable = true },
@ -130,8 +138,8 @@ _NgConfigValues = {
disable_format_cap = {}, -- a list of lsp disable file format (e.g. if you using efm or vim-codeformat etc), empty by default
disable_lsp = {}, -- a list of lsp server disabled for your project, e.g. denols and tsserver you may
-- only want to enable one lsp server
display_diagnostic_qf = true, -- bool: always show quickfix if there are diagnostic errors
-- string: trouble use trouble to show diagnostic
display_diagnostic_qf = false, -- bool: always show quickfix if there are diagnostic errors
-- string: trouble use trouble to show diagnostic
diagnostic_load_files = false, -- lsp diagnostic errors list may contains uri that not opened yet set to true
-- to load those files
diagnostic_virtual_text = true, -- show virtual for diagnostic message
@ -342,7 +350,7 @@ M.setup = function(cfg)
end
if _NgConfigValues.ts_fold == true then
require('navigator.foldts').on_attach()
require('navigator.foldts').on_attach()
end
local _start_client = vim.lsp.start_client

@ -320,14 +320,7 @@ function M.setup()
signs = true,
update_in_insert = _NgConfigValues.lsp.diagnostic.update_in_insert or false,
severity_sort = _NgConfigValues.lsp.diagnostic.severity_sort,
float = {
focusable = false,
style = 'minimal',
border = 'rounded',
source = 'always',
header = '',
prefix = '',
},
float = _NgConfigValues.lsp.diagnostic.float,
}
diagnostic_cfg.virtual_text = _NgConfigValues.lsp.diagnostic.virtual_text
if

Loading…
Cancel
Save