editor: Don't bypass show_edit_predictions when navigating diagnostics - #56055
Merged
osyvokon merged 2 commits intoJun 5, 2026
Merged
Conversation
aviatesk
force-pushed
the
avi/fix-diagnostic-definition-requests
branch
from
May 7, 2026 14:00
bc3ec9b to
8bcf1dc
Compare
aviatesk
force-pushed
the
avi/fix-diagnostic-definition-requests
branch
from
May 12, 2026 04:31
8bcf1dc to
4ffba50
Compare
Collaborator
Author
aviatesk
force-pushed
the
avi/fix-diagnostic-definition-requests
branch
from
May 29, 2026 02:16
4ffba50 to
7863bd5
Compare
`go_to_diagnostic_impl` was calling `refresh_edit_prediction(false, true)` with `user_requested = true`, which skips the `should_show_edit_predictions` check in `refresh_edit_prediction`. As a result, navigating between diagnostics in a buffer where the user has set `show_edit_predictions: false` would still trigger the edit prediction provider's `refresh`. With the Zed provider this fans out into many `textDocument/definition` and `textDocument/typeDefinition` LSP requests for every identifier near the cursor, 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 edit prediction context being refreshed when navigating between diagnostics in buffers where edit predictions are disabled, which could trigger many LSP definition requests
aviatesk
force-pushed
the
avi/fix-diagnostic-definition-requests
branch
from
June 5, 2026 01:16
7863bd5 to
fc740a1
Compare
Collaborator
Author
|
Bump. |
osyvokon
enabled auto-merge
June 5, 2026 08:44
TomPlanche
pushed a commit
to TomPlanche/zed
that referenced
this pull request
Jun 8, 2026
zed-industries#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>
This was referenced Jun 18, 2026
Closed
This was referenced Jul 1, 2026
This was referenced Jul 10, 2026
jonx
pushed a commit
to jonx/zed-aros
that referenced
this pull request
Jul 17, 2026
zed-industries#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>
jolutz
pushed a commit
to jolutz/zed
that referenced
this pull request
Aug 8, 2026
zed-industries#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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
go_to_diagnostic_implwas callingrefresh_edit_prediction(false, true)withuser_requested = true, which skips theshould_show_edit_predictionscheck insiderefresh_edit_prediction(crates/editor/src/editor.rs).As a result, navigating between diagnostics in a buffer where the user has set
show_edit_predictions: falsewould still triggerEditPredictionProvider::refresh. With the Zed provider this fans out into manytextDocument/definitionandtextDocument/typeDefinitionLSP 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 = falseand enable debouncing here.Release Notes: