#1157 update lsp diagnostics when the tree state is changed (#1174)

This commit is contained in:
Alexander Courtis 2022-04-18 23:46:42 +10:00 committed by GitHub
parent cdbc210d92
commit 0f0f858348
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 0 deletions

View File

@ -3,6 +3,7 @@ local a = vim.api
local log = require "nvim-tree.log"
local utils = require "nvim-tree.utils"
local core = require "nvim-tree.core"
local diagnostics = require "nvim-tree.diagnostics"
local M = {
current_tab = a.nvim_get_current_tabpage(),
@ -44,6 +45,7 @@ function M.force_dirchange(foldername, with_open)
else
require("nvim-tree.renderer").draw()
end
diagnostics.update()
log.profile_end(ps, "change dir %s", foldername)
end

View File

@ -1,6 +1,7 @@
local renderer = require "nvim-tree.renderer"
local utils = require "nvim-tree.utils"
local core = require "nvim-tree.core"
local diagnostics = require "nvim-tree.diagnostics"
local M = {}
@ -38,6 +39,7 @@ function M.fn(keep_buffers)
iter(core.get_explorer().nodes)
renderer.draw()
diagnostics.update()
end
return M

View File

@ -122,6 +122,7 @@ function M.open(cwd)
else
open_view_and_draw()
end
diagnostics.update()
view.restore_tab_state()
end