Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow apidom-ls strict filter #2954

Merged
merged 2 commits into from
Jul 17, 2023
Merged

feat: allow apidom-ls strict filter #2954

merged 2 commits into from
Jul 17, 2023

Conversation

frantuma
Copy link
Member

Refs swagger-api/swagger-editor#4216

This PR introduces support for language service "strict" filtering of completion items, as opt-in based on client passing enableLSPFilter: true to completionContext (within languageServiceContext).

setting the flag will cause completion items to be filtered vs current word, returning only the ones where insertText includes the current word.

This is an opinionated behaviour, as the default for LSP completions is to leave the filtering logic to the editor/client; Monaco editor always performs fuzzy matching against the filterText value and/or the current word, and in the ticket scenario it still displays non "strict matching" items, which is possibly a desired behavior in many cases (e.g it still provides hints in case of typos etc).

This is quite dabated though.

@frantuma frantuma force-pushed the issue-4216 branch 10 times, most recently from 74cbc0f to 334eedc Compare July 16, 2023 09:43
@frantuma frantuma merged commit 9f92eaa into main Jul 17, 2023
8 checks passed
@frantuma frantuma deleted the issue-4216 branch July 17, 2023 10:54
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.

None yet

1 participant