diff options
| author | Lewis Russell <lewis6991@gmail.com> | 2024-04-30 09:57:31 +0100 |
|---|---|---|
| committer | Lewis Russell <me@lewisr.dev> | 2024-04-30 13:39:27 +0100 |
| commit | ee41153a945876ad0c7f0927ffa7b5a5afdaca89 (patch) | |
| tree | 6626b81f72f4b38185d3722f9391b4266d4ca26b /runtime/doc | |
| parent | 0330dd9e69de7567fd2479c0203b778a1d2dce2f (diff) | |
| download | rneovim-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 'runtime/doc')
| -rw-r--r-- | runtime/doc/diagnostic.txt | 7 | ||||
| -rw-r--r-- | runtime/doc/news.txt | 5 |
2 files changed, 3 insertions, 9 deletions
diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt index 4958dcfe67..ac10b4ea39 100644 --- a/runtime/doc/diagnostic.txt +++ b/runtime/doc/diagnostic.txt @@ -389,9 +389,8 @@ Lua module: vim.diagnostic *diagnostic-api* |nvim_win_get_cursor()|. • {wrap}? (`boolean`, default: `true`) Whether to loop around file or not. Similar to 'wrapscan'. - • {severity}? (`vim.diagnostic.Severity`) See - |diagnostic-severity|. If `nil`, go to the - diagnostic with the highest severity. + • {severity}? (`vim.diagnostic.SeverityFilter`) See + |diagnostic-severity|. • {float}? (`boolean|vim.diagnostic.Opts.Float`, default: `true`) If `true`, call |vim.diagnostic.open_float()| after moving. If a @@ -435,7 +434,7 @@ Lua module: vim.diagnostic *diagnostic-api* • {update_in_insert}? (`boolean`, default: `false`) Update diagnostics in Insert mode (if `false`, diagnostics are updated on |InsertLeave|) - • {severity_sort}? (`boolean|{reverse?:boolean}`, default: `false) + • {severity_sort}? (`boolean|{reverse?:boolean}`, default: `false`) Sort diagnostics by severity. This affects the order in which signs and virtual text are displayed. When true, higher severities are diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 57f0f1d6d4..bae0030a14 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -140,11 +140,6 @@ The following changes may require adaptations in user config or plugins. • |nvim_open_win()| now blocks all autocommands when `noautocmd` is set, rather than just those from setting the `buffer` to display in the window. -• |vim.diagnostic.goto_next()| and |vim.diagnostic.goto_prev()| jump to the - diagnostic with the highest severity when the "severity" option is - unspecified. To use the old behavior, use: >lua - vim.diagnostic.goto_next({ severity = { min = vim.diagnostic.severity.HINT } }) - ============================================================================== BREAKING CHANGES IN HEAD *news-breaking-dev* |