-
Notifications
You must be signed in to change notification settings - Fork 38
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
Completion items not properly matching full 'word' #46
Comments
Another example of this issue, still in clojure: (ns example
(:require
[clojure.test :as scope.test]))
scope.te|
;; autocompletes to
scope.scope.test |
They typically do ( It could be the LSP supports it, but disables the behavior, due to not broadcasting the capabilities correctly as per #13 |
I don't think its #13 as I copied over the capabilities config from You're right about the textEdit - I did some inspection and it's not being set. I also took a peek at how But similarly to blink, For reference: Looks like there is this function to get the range: https://github.com/hrsh7th/nvim-cmp/blob/ae644feb7b67bf1ce4260c231d1d4300b19c6f30/lua/cmp/core.lua#L449 And then this plus a bunch of other functions for guessing the range: https://github.com/hrsh7th/nvim-cmp/blob/ae644feb7b67bf1ce4260c231d1d4300b19c6f30/lua/cmp/entry.lua#L316 Looks a bit gnarly to untangle |
I suppose this is a continuation of #38. The issue reported there was resolved by 655d2ee but there is still an issue with the word selection logic.
The issue is that the replacement doesn't always match all the relevant text.
Example:
So it's not replacing the entire text of
test/use
it's just replacing theuse
component.I wonder if the lsp completion items contain context about the range they are operating over.
The text was updated successfully, but these errors were encountered: