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

omnifunc/LspOmniFunc does not filter completion options #366

Open
dunric opened this issue Jul 26, 2023 · 1 comment
Open

omnifunc/LspOmniFunc does not filter completion options #366

dunric opened this issue Jul 26, 2023 · 1 comment

Comments

@dunric
Copy link

dunric commented Jul 26, 2023

When autoComplete is set to false, manual invocation of a completion uses omnifunc buffer setting which defaults to LspOmniFunc. However it completely ignores already typed chars and offers full list of completion options from the server.

For example, in a rust filetype buffer using rust-analyzer as a lsp server, invoking omnifunc completion for a string literal followed with .to

"hello".to

offers unfiltered and unsorted list of completions:

replace
replacen
to_lowercase
to_uppercase
repeat
to_ascii_lowercase
…

instead of only words starting with to

to_lowercase
to_uppercase
to_ascii_lowercase
to_ascii_upperrcase
to_string
to_owned

When autoComplete is on it does not happen, because there is no existing prefix by which options are filtered.

Expected behavior: already typed chars are used for narrowing down list of completion options.

Completion matcher is "case" for case sensitive search.

@girishji
Copy link
Contributor

girishji commented Aug 1, 2023

This is because the results are not sorted correctly from rust-analyzer. You can try this plugin https://github.com/girishji/vimcomplete and see if it solves your problem.

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

No branches or pull requests

2 participants