mirror of
https://github.com/neovim/neovim.git
synced 2025-09-13 23:08:16 +00:00
feat(lsp): deprecate severity_limit
Problem: `vim.lsp.diagnostic.on_diagnostic` accepts an undocumented severity_limit option which is widely used. Solution: Deprecate it in favour of `{min = severity}` used in `vim.diagnostic`. Since this is undocumented, the schedule for removal is accelerated to 0.11.
This commit is contained in:

committed by
Lewis Russell

parent
5c36701228
commit
451bc50d40
@@ -193,7 +193,7 @@ describe('vim.lsp.diagnostic', function()
|
||||
PublishDiagnostics = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
|
||||
underline = false,
|
||||
virtual_text = {
|
||||
severity_limit = ...
|
||||
severity = { min = ... }
|
||||
},
|
||||
})
|
||||
|
||||
@@ -212,11 +212,11 @@ describe('vim.lsp.diagnostic', function()
|
||||
end
|
||||
|
||||
-- No messages with Error or higher
|
||||
eq(0, get_extmark_count_with_severity('Error'))
|
||||
eq(0, get_extmark_count_with_severity('ERROR'))
|
||||
|
||||
-- But now we don't filter it
|
||||
eq(1, get_extmark_count_with_severity('Warning'))
|
||||
eq(1, get_extmark_count_with_severity('Hint'))
|
||||
eq(1, get_extmark_count_with_severity('WARN'))
|
||||
eq(1, get_extmark_count_with_severity('HINT'))
|
||||
end)
|
||||
|
||||
it('correctly handles UTF-16 offsets', function()
|
||||
|
Reference in New Issue
Block a user