Skip to content

Commit aae0185

Browse files
Yu-Leoalex-courtis
andauthored
fix(#3041): use vim.diagnostic.get for updating diagnostics (#3042)
* fix(#3041): use vim.diagnostic.get for updating diagnostics * fix(#3041): remove unnecessary @type --------- Co-authored-by: Alexander Courtis <[email protected]>
1 parent 68fc4c2 commit aae0185

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lua/nvim-tree/diagnostics.lua

+1-2
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,7 @@ function M.update_lsp(ev)
128128

129129
local profile_event = log.profile_start("DiagnosticChanged event")
130130

131-
---@type vim.Diagnostic[]
132-
local diagnostics = ev.data.diagnostics
131+
local diagnostics = vim.diagnostic.get(ev.buf)
133132

134133
-- use the buffer from the event, as ev.data.diagnostics will be empty on resolved diagnostics
135134
local bufname = uniformize_path(vim.api.nvim_buf_get_name(ev.buf))

0 commit comments

Comments
 (0)