feat(diagnostics): additional filter options (#1610)

- root_dir. Useful to browse only project-scoped diagnostics.
- buflisted status. Useful to exclude diagnostics from unlisted buffers, which are created by language servers that analyze the entire project/workspace (e.g. sumneko-lua).
This commit is contained in:
Sean Mackesey
2022-03-12 07:49:06 -08:00
committed by GitHub
parent 6b3728876f
commit 1e4d5e59df
3 changed files with 40 additions and 22 deletions

View File

@@ -426,7 +426,7 @@ builtin.lsp_dynamic_workspace_symbols = require_on_exported_call("telescope.buil
--
--
--- Lists diagnostics for current or all open buffers
--- Lists diagnostics
--- - Fields:
--- - `All severity flags can be passed as `string` or `number` as per `:vim.diagnostic.severity:`
--- - Default keymaps:
@@ -436,6 +436,8 @@ builtin.lsp_dynamic_workspace_symbols = require_on_exported_call("telescope.buil
---@field severity string|number: filter diagnostics by severity name (string) or id (number)
---@field severity_limit string|number: keep diagnostics equal or more severe wrt severity name (string) or id (number)
---@field severity_bound string|number: keep diagnostics equal or less severe wrt severity name (string) or id (number)
---@field root_dir string|boolean: if set to string, get diagnostics only for buffers under this dir otherwise cwd
---@field no_unlisted boolean: if true, get diagnostics only for listed buffers
---@field no_sign boolean: hide DiagnosticSigns from Results (default: false)
---@field line_width number: set length of diagnostic entry text in Results
---@field namespace number: limit your diagnostics to a specific namespace