Skip to content

Commit

Permalink
fix: workspace and document diagnostics were switched around
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed May 9, 2021
1 parent 2b27b96 commit 1fa8469
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/trouble/providers/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ local M = {}
---@param options Options
---@return Item[]
function M.diagnostics(win, buf, cb, options)
if options.mode == "lsp_document_diagnostics" then buf = nil end
if options.mode == "lsp_workspace_diagnostics" then buf = nil end
local buffer_diags = buf and {[buf] = vim.lsp.diagnostic.get(buf, nil)} or
vim.lsp.diagnostic.get_all()

Expand Down

0 comments on commit 1fa8469

Please sign in to comment.