-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Fix autocompletion leading to duplicated symbols and tokens #527
Fix autocompletion leading to duplicated symbols and tokens #527
Conversation
Effectively, this fixes a bunch of bugs causing duplicated symbols or tokens when choosing an auto-completion item from the list. For instance, it fixes use statements, @sth in docblocks, fully- qualified names, etc.
To fix variables producing two dollars in autocompletion, we should change Serenata instead. @Gert-dev, what's your opinion? |
tl;dr: IIRC the IIRC, though it's been a while, the Serenata server should already be sending an actual text edit with a range that includes the dollar sign when it needs to be replaced in the From what I remember the list of special characters to treat differently during completion were the initial way for servers to say "insert this text at the current position", and clients needed to be smart and decide what parts of the word needed to be replaced when inserting the completion provided by the server. This resulted in problems with special characters such as dollar signs as in most languages these are not part of identifiers like PHP, and making a good single decision for all programming languages and their different servers isn't easy. In a later revision of the protocol, they introduced the |
So you think we should report an issue in atom-languageclient? |
In the context of autocompletion.
So this is it; this PR is ready. It contains a workaround for variables, until the upstream PR is merged. |
It is not ready yet. The update to 1.16 of atom-languageclient caused a regression: when trying to use a class, and the auto-insertion of the |
Basically, in 1.16, it is implemented in atom-languageclient, so no need for a duplicated one.
The recent workaround for duplicated dollar signs need to be added to the existing functionality, not replacing it. Fix this.
The regression is fixed. We should be ready, finally. :) |
LGTM, thanks! |
@machitgarha I've also invited you as collaborator since I already accepted your request on GitLab. I'm still willing to review these changes and answer question as I'm doing now, but I haven't used Atom in a long time, so if you still do, you are probably in a better position to decide what works and what doesn't for Atom specifically 🙂 . |
@Gert-dev, wow, thank you very much! You mean, when I create PRs, I should ask you to review them before merging? Or you mean you continue to have a look on this project? |
@machitgarha I meant you don't (even) have to ask me for permission before merging, since I think you are in a better position to judge what works and what doesn't for Atom 🙂. However, if you are uncertain about something, or want to make an MR or get input regardless, I'll still happily do so 😄 . |
Thanks for this bugfix! 🥟 |
This should close #487.