fix: lsp diagnostics user autocmd setup
This commit is contained in:
@@ -383,9 +383,6 @@ local function setup_autocommands(opts)
|
|||||||
au User FugitiveChanged,NeogitStatusRefreshed lua require'nvim-tree'.refresh()
|
au User FugitiveChanged,NeogitStatusRefreshed lua require'nvim-tree'.refresh()
|
||||||
]]
|
]]
|
||||||
|
|
||||||
if opts.lsp_diagnostics then
|
|
||||||
vim.cmd "au User LspDiagnosticsChanged lua require'nvim-tree.diagnostics'.update()"
|
|
||||||
end
|
|
||||||
if opts.auto_close then
|
if opts.auto_close then
|
||||||
vim.cmd "au WinClosed * lua require'nvim-tree'.on_leave()"
|
vim.cmd "au WinClosed * lua require'nvim-tree'.on_leave()"
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -134,6 +134,14 @@ function M.setup(opts)
|
|||||||
for lhs, rhs in pairs(links) do
|
for lhs, rhs in pairs(links) do
|
||||||
vim.cmd("hi def link "..lhs.." "..rhs)
|
vim.cmd("hi def link "..lhs.." "..rhs)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if M.enable then
|
||||||
|
if has_06 then
|
||||||
|
vim.cmd "au User DiagnosticsChanged lua require'nvim-tree.diagnostics'.update()"
|
||||||
|
else
|
||||||
|
vim.cmd "au User LspDiagnosticsChanged lua require'nvim-tree.diagnostics'.update()"
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|||||||
Reference in New Issue
Block a user