Fix completion filtering for multi-character prefixes - #5164
Open
germtb wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes completion filtering when a multi-character prefix ends with an LSP trigger character.
Changes:
- Matches advertised triggers against prefix suffixes.
- Adds Rust
::regression coverage. - Reuses trigger detection during filtering.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
autoload/ale/completion.vim |
Adds suffix-based trigger matching and filtering. |
test/completion/test_completion_filtering.vader |
Tests :: with rust-analyzer’s : trigger. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
germtb
force-pushed
the
fix-completion-multichar-prefixes
branch
from
August 24, 2026 09:53
8d375ce to
f503898
Compare
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.
Fix a bug where ALE was filtering completions after multi-character prefixes (e.g. "::").
rust-analyzeradvertises single-characters triggers (this is correct for in the LSP spec: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#completionContext), but some prefixes are not single characters.Root cause
rust-analyzeradvertises :Fix
ALE accepts a trigger if it matches the end of a prefix.
Test
I added a regression two assertions to two existing tests that passes now and fail without the fix.