mirror of
https://github.com/zed-industries/zed.git
synced 2026-12-02 13:30:26 +01:00
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:
@@ -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