mirror of
https://github.com/ray-x/navigator.lua
synced 2024-11-05 12:00:21 +00:00
diagnostic updates
This commit is contained in:
parent
4ba2c9557e
commit
8661bcd7ff
@ -433,9 +433,18 @@ M.setloclist = function(bufnr)
|
||||
|
||||
if not vim.tbl_isempty(vim.lsp.get_active_clients({ buffer = bufnr })) then
|
||||
local err_cnt = get_count(0, [[Error]])
|
||||
if err_cnt > 0 and _NgConfigValues.lsp.display_diagnostic_qf then
|
||||
cfg.namespaces = diagnostic.get_namespaces()
|
||||
diagnostic.setloclist(cfg)
|
||||
if err_cnt > 0 then
|
||||
if _NgConfigValues.lsp.display_diagnostic_qf then
|
||||
if _NgConfigValues.lsp.display_diagnostic_qf == 'trouble' then
|
||||
vim.cmd('Trouble')
|
||||
else
|
||||
cfg.namespaces = diagnostic.get_namespaces()
|
||||
cfg.open = true
|
||||
diagnostic.setloclist(cfg)
|
||||
end
|
||||
else
|
||||
vim.notify('Error count: ' .. tostring(err_cnt) .. ' please check quickfix')
|
||||
end
|
||||
else
|
||||
vim.cmd('lclose')
|
||||
end
|
||||
|
0
playground/rust/Cargo.toml
Executable file → Normal file
0
playground/rust/Cargo.toml
Executable file → Normal file
0
playground/rust/src/main.rs
Executable file → Normal file
0
playground/rust/src/main.rs
Executable file → Normal file
Loading…
Reference in New Issue
Block a user