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
This commit is contained in:
committed by
GitHub
parent
74be3c3bba
commit
6b79d7a6a4
@@ -87,6 +87,9 @@ local diagnostics_to_tbl = function(opts)
|
||||
diagnosis_opts.severity["max"] = opts.severity_bound
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user