diagnostics: Prefer activating diagnostic under cursor (#52957)
Update the behavior of both `editor: go to diagnostic` and `editor: go to previous diagnostic` in order to ensure that, if there's a diagnostic under the user's cursor that isn't active, it is first activated, with a subsequent call jumping to the next or previous diagnostic, respectively. These changes also update how diagnostic activation handles the situation when the global diagnostic renderer is not registered, as we used to not update the active diagnostic group in that situation. However, we now rely on it to determine whether the user's cursor is already in the active diagnostic, with some tests now failing, so we now default to an empty set of blocks for the active diagnostic group when no global renderer is registered. Release Notes: - Update both `editor: go to diagnostic` and `editor: go to previous diagnostic` to prefer activating the diagnostic under the cursor before jumping to the next or previous diagnostic, respectively --------- Co-authored-by: dino <dinojoaocosta@gmail.com>
This commit is contained in:
1 parent
24fd1015f0
commit
3bb2f2a61d
6 files changed
+295
-74
No files matched your search
@@ -2098,6 +2098,7 @@ To interpret all `.c` files as C++, files called `MyLockFile` as TOML and files
|
||||
```json [settings]
|
||||
{
|
||||
"diagnostics": {
|
||||
"button": true,
|
||||
"include_warnings": true,
|
||||
"inline": {
|
||||
"enabled": false
|
||||
@@ -2106,6 +2107,11 @@ To interpret all `.c` files as C++, files called `MyLockFile` as TOML and files
|
||||
}
|
||||
```
|
||||
|
||||
**Options**
|
||||
|
||||
- `button`: Whether to show the project diagnostics button in the status bar
|
||||
- `include_warnings`: Whether to show warnings or not by default
|
||||
|
||||
### Inline Diagnostics
|
||||
|
||||
- Description: Whether or not to show diagnostics information inline.
|
||||
|
||||
Reference in new issue
Block a user