Skip to content

Commit

Permalink
fix(#3041): use vim.diagnostic.get for updating diagnostics (#3042)
Browse files Browse the repository at this point in the history
* fix(#3041): use vim.diagnostic.get for updating diagnostics

* fix(#3041): remove unnecessary @type

---------

Co-authored-by: Alexander Courtis <[email protected]>
  • Loading branch information
Yu-Leo and alex-courtis authored Jan 13, 2025
1 parent 68fc4c2 commit aae0185
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lua/nvim-tree/diagnostics.lua
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ function M.update_lsp(ev)

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

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

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

0 comments on commit aae0185

Please sign in to comment.