mirror of
https://github.com/zoriya/telescope.nvim.git
synced 2026-06-05 03:49:36 +00:00
fix: use nil for the default diagnostics severity (#2662)
* fix: use nil for the default diagnostics severity
https://github.com/neovim/neovim/pull/24736 has introduced a new syntax
for severity format in `vim.diagnostic.get()`.
Fix #2661
* fix: fallback for 0.9.1
* fix: detect changes only when minor version > 9
(cherry picked from commit 6b79d7a6a4)
This commit is contained in:
committed by
Simon Hauser
parent
0847120c40
commit
573a8b2b5f
@@ -44,6 +44,9 @@ local diagnostics_to_tbl = function(opts)
|
|||||||
diagnosis_opts.severity["max"] = opts.severity_bound
|
diagnosis_opts.severity["max"] = opts.severity_bound
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if vim.version().minor > 9 and vim.tbl_isempty(diagnosis_opts.severity) then
|
||||||
|
diagnosis_opts.severity = nil
|
||||||
|
end
|
||||||
|
|
||||||
opts.root_dir = opts.root_dir == true and vim.loop.cwd() or opts.root_dir
|
opts.root_dir = opts.root_dir == true and vim.loop.cwd() or opts.root_dir
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user