aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/diagnostic_spec.lua
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2024-04-30 09:57:31 +0100
committerLewis Russell <me@lewisr.dev>2024-04-30 13:39:27 +0100
commitee41153a945876ad0c7f0927ffa7b5a5afdaca89 (patch)
tree6626b81f72f4b38185d3722f9391b4266d4ca26b /test/functional/lua/diagnostic_spec.lua
parent0330dd9e69de7567fd2479c0203b778a1d2dce2f (diff)
downloadrneovim-ee41153a945876ad0c7f0927ffa7b5a5afdaca89.tar.gz
rneovim-ee41153a945876ad0c7f0927ffa7b5a5afdaca89.tar.bz2
rneovim-ee41153a945876ad0c7f0927ffa7b5a5afdaca89.zip
feat(diagnostic): revert default behaviour of goto_next/prev()
Follow-up to #28490 Problem: The new behaviour of goto_next/prev() of navigating to the next highest severity doesn't work well when diagnostic providers have different interpretations of severities. E.g. the user may be blocked from navigating to a useful LSP warning, due to some linter error. Solution: The behaviour of next highest severity is now a hidden option `_highest = true`. We can revisit how to integrate this behaviour during the 0.11 cycle.
Diffstat (limited to 'test/functional/lua/diagnostic_spec.lua')
-rw-r--r--test/functional/lua/diagnostic_spec.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/functional/lua/diagnostic_spec.lua b/test/functional/lua/diagnostic_spec.lua
index 2e6f7fbf36..05082bc132 100644
--- a/test/functional/lua/diagnostic_spec.lua
+++ b/test/functional/lua/diagnostic_spec.lua
@@ -962,7 +962,7 @@ describe('vim.diagnostic', function()
eq(
{ 3, 0 },
exec_lua([[
- vim.diagnostic.goto_next()
+ vim.diagnostic.goto_next({_highest = true})
return vim.api.nvim_win_get_cursor(0)
]])
)
@@ -970,7 +970,7 @@ describe('vim.diagnostic', function()
eq(
{ 5, 0 },
exec_lua([[
- vim.diagnostic.goto_next()
+ vim.diagnostic.goto_next({_highest = true})
return vim.api.nvim_win_get_cursor(0)
]])
)
@@ -991,7 +991,7 @@ describe('vim.diagnostic', function()
eq(
{ 4, 0 },
exec_lua([[
- vim.diagnostic.goto_next()
+ vim.diagnostic.goto_next({_highest = true})
return vim.api.nvim_win_get_cursor(0)
]])
)
@@ -999,7 +999,7 @@ describe('vim.diagnostic', function()
eq(
{ 6, 0 },
exec_lua([[
- vim.diagnostic.goto_next()
+ vim.diagnostic.goto_next({_highest = true})
return vim.api.nvim_win_get_cursor(0)
]])
)
@@ -1021,7 +1021,7 @@ describe('vim.diagnostic', function()
eq(
{ 2, 0 },
exec_lua([[
- vim.diagnostic.goto_next({ severity = { min = vim.diagnostic.severity.HINT } })
+ vim.diagnostic.goto_next()
return vim.api.nvim_win_get_cursor(0)
]])
)
@@ -1029,7 +1029,7 @@ describe('vim.diagnostic', function()
eq(
{ 3, 0 },
exec_lua([[
- vim.diagnostic.goto_next({ severity = { min = vim.diagnostic.severity.HINT } })
+ vim.diagnostic.goto_next()
return vim.api.nvim_win_get_cursor(0)
]])
)
@@ -1037,7 +1037,7 @@ describe('vim.diagnostic', function()
eq(
{ 4, 0 },
exec_lua([[
- vim.diagnostic.goto_next({ severity = { min = vim.diagnostic.severity.HINT } })
+ vim.diagnostic.goto_next()
return vim.api.nvim_win_get_cursor(0)
]])
)