Skip to content

fix(lsp): improve workspace symbol filtering - #306

Merged
fcoury merged 1 commit into
mainfrom
fcoury/workspace-symbol-filtering
Aug 22, 2026
Merged

fcoury merged 1 commit into
mainfrom
fcoury/workspace-symbol-filtering

Conversation

@fcoury-oai

Copy link
Copy Markdown
Collaborator

Workspace symbol search currently delegates filtering entirely to the LSP callback. As a result, typing can briefly flash the query without narrowing or reranking the current rows, and fast queries can wait on or be overtaken by asynchronous responses.

This change keeps local picker filtering and label-first ranking active while continuing to refresh candidates from the language server. It debounces workspace requests, invalidates stale responses as soon as the query changes, reports loading state consistently, and preserves existing rows until large batched replacements begin arriving.

How to Test

  1. Open a Rust workspace with LSP symbols, invoke Workspace Symbols with Space w, and wait for the initial results.
  2. Type Prompt. The visible list should filter immediately, with an exact Prompt symbol ranked ahead of fuzzy matches, then refresh after the debounced server response.
  3. Edit the query rapidly. Results from an older request must not replace the latest query, and existing rows should remain visible while a large replacement is batched.

Automated coverage:

  • cargo test -p red lsp_symbols_
  • cargo test -p red callback_picker_filters_and_ranks_locally_while_emitting_queries

@fcoury
fcoury force-pushed the fcoury/workspace-symbol-filtering branch from fc9f8f0 to 6ae3be1 Compare August 22, 2026 04:03
@fcoury
fcoury merged commit f4ebad3 into main Aug 22, 2026
12 checks passed
@fcoury
fcoury deleted the fcoury/workspace-symbol-filtering branch August 22, 2026 04:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants