Skip to content

Commit

Permalink
fix: use deprecated vim.lsp.diagnostics for now
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Oct 22, 2021
1 parent 063aefd commit afb300f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/trouble/providers/lsp.lua
Expand Up @@ -10,8 +10,8 @@ function M.diagnostics(_win, buf, cb, options)
if options.mode == "lsp_workspace_diagnostics" then
buf = nil
end
local diag = vim.diagnostic or vim.lsp.diagnostic
local buffer_diags = buf and { [buf] = diag.get(buf, nil) } or diag.get_all()

local buffer_diags = buf and { [buf] = vim.lsp.diagnostic.get(buf) } or vim.lsp.diagnostic.get_all()

local items = util.locations_to_items(buffer_diags, 1)
cb(items)
Expand Down

0 comments on commit afb300f

Please sign in to comment.