# editor: Don't bypass show_edit_predictions when navigating diagnostics \(\#56055\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/b93d14edf25c85725d97d434abca384a76c74b17)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: b93d14edf25c85725d97d434abca384a76c74b17

Requested commit: b93d14edf25c85725d97d434abca384a76c74b17

Commit: b93d14edf25c85725d97d434abca384a76c74b17

Tree: fb23e9b68d66708c6cc3105681c2540a4c1f16de

Author: Shuhei Kadowaki

Committer: GitHub

## Message

```
editor: Don't bypass show_edit_predictions when navigating diagnostics (#56055)

`go_to_diagnostic_impl` was calling `refresh_edit_prediction(false,
true)` with `user_requested = true`, which skips the
`should_show_edit_predictions` check inside `refresh_edit_prediction`
(`crates/editor/src/editor.rs`).

As a result, navigating between diagnostics in a buffer where the user
has set `show_edit_predictions: false` would still trigger
`EditPredictionProvider::refresh`. With the Zed provider this fans out
into many `textDocument/definition` and `textDocument/typeDefinition`
LSP requests for every identifier near the cursor
(`RelatedExcerptStore::fetch_excerpts`), which is surprising for users
who have explicitly disabled edit predictions for that language.

Jumping to a diagnostic is a navigation action, not a request for an
edit prediction, so pass `user_requested = false` and enable debouncing
here.

Release Notes:

- Fixed diagnostic navigation triggering unnecessary LSP requests when
edit predictions are disabled.

Co-authored-by: Oleksiy Syvokon <oleksiy@zed.dev>
```

## Parents

- [693356221ec3be957fb95154e438add6a57a88cc](https://git.cafe/gitcafe/zed/commit/693356221ec3be957fb95154e438add6a57a88cc?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/b93d14edf25c85725d97d434abca384a76c74b17?format=markdown)
