diff options
author | Lewis Russell <lewis6991@gmail.com> | 2024-02-08 12:11:47 +0000 |
---|---|---|
committer | Lewis Russell <me@lewisr.dev> | 2024-02-08 16:58:49 +0000 |
commit | 451bc50d40ee43a40285d16039deb83c9bf05ff6 (patch) | |
tree | bd4d076349d0213c31fc79615ab752e935397d6c /test/functional/plugin/lsp/diagnostic_spec.lua | |
parent | 5c36701228e166f8aa89983044404ff322fe481f (diff) | |
download | rneovim-451bc50d40ee43a40285d16039deb83c9bf05ff6.tar.gz rneovim-451bc50d40ee43a40285d16039deb83c9bf05ff6.tar.bz2 rneovim-451bc50d40ee43a40285d16039deb83c9bf05ff6.zip |
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.
Diffstat (limited to 'test/functional/plugin/lsp/diagnostic_spec.lua')
-rw-r--r-- | test/functional/plugin/lsp/diagnostic_spec.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/functional/plugin/lsp/diagnostic_spec.lua b/test/functional/plugin/lsp/diagnostic_spec.lua index ee8dfc7a60..705c182df7 100644 --- a/test/functional/plugin/lsp/diagnostic_spec.lua +++ b/test/functional/plugin/lsp/diagnostic_spec.lua @@ -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() |