-
Notifications
You must be signed in to change notification settings - Fork 165
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
Incorrect handling of special characters in completion items #923
Comments
I guess this is kinda multiple issues in one, but they are all somewhat related I think so leaving it bundled to not make more noise. I am happy to break this into multiple issues though if you prefer. Let me know! |
I think what I see is the same issue (or at least related), but in this case with function parameters that contain special characters (dots/periods):
The language is |
Unsure if this is the same issue, but when using the Intelephense LSP with PHP I'm not seeing functions/namespaces included in the completion menu (and PHP oddly uses a backslash for namespace separator). This works with nvim-cmp, so I'm assuming the info is being returned by the LSP, but then not included for some reason by Blink. Disclaimer: I'm a total beginner with LSP stuff so might not be formulating the description correctly, and am at a loss as to where to look for the issue... Edit: Still unsure if related, but my particular issue seems to come from the Rust fuzzy finding here, where setting min_score to 0 means I see results returned for namespaces/functions (but the results are not well sorted, so contains lots of noise). blink.cmp/lua/blink/cmp/fuzzy/init.lua Line 82 in 2144c58
Any tips on where to look next appreciated. |
I updated the title and issue description to clarify there are two main issues listed here. Should make it easier for people reporting similar issues to find this. |
Make sure you have done the following
blink.cmp
<C-k>
on https://cmp.saghen.dev)Bug Description
Issue 1 - Resolved by 4c7ab7a!
Blink behaves weirdly if completion items contain special characters.
I'm sure the clojure language is a pretty good stress test for blink because clojure vars can and do contain a larger range of 'special' characters than other languages.
A very common one is the
!
character to indicate mutation or side-effects and->
or>
/<
characters.For example if I have a lib exporting the following:
and try autocomplete it as follows:
Then I only see:
When I would expect to see all three exported vars.
If I comment out the
do-something
export then, surprisingly, I see the special-character exports:Issue 2
Trying to accept the suggestions of either of the two above items containing special characters results in incorrect content being inserted into the buffer:
(lib/lib/do-something!)
This seems to be #46 raising its head again, though limited to special characters.
I recorded a short vid to demonstrate:
special-chars.mov
Just to be super explicit, I'm going to explain:
do-something
when it should show all three exported functions. Accepting it does inserts the correct content into the buffer, which is good.do-something
as an exported var in thelib
module results in both the two special-character containing exports to now show as expected.lib/
identifier).>
character hides the autocompletion menu when, for clojure, I expect it to remain. This should still be considered a keyword (should this be made configurable in blink?)Relevant configuration
No response
neovim
version0.10.2
blink.cmp
versionmain
The text was updated successfully, but these errors were encountered: