-
Notifications
You must be signed in to change notification settings - Fork 31
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
Fixed FileCompletionItem to replace the entire node value for cleaner completion #127
Conversation
pauldpong
commented
Jul 31, 2020
- Changed how we got the prefix for autocompletion, no longer need to do substring of the entire document.
- toFileCompletionItem will now attempt to get the full range of the node value, and replace the entire value rather than what is returned by request.getReplaceRange
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add a test that reproduces the issue ans ensure the patch fixes it?
I wonder if this problem comes from LemMinx eclipse-lemminx/lemminx#723 ? |
Yep, added a test that make sure that the replace range for file completion is the entire text node. @mickaelistria
I believe so. Should this fix go through as a temporary fix or should we just wait for that bug to be fixed? |
IMHO, I think the bug should be fixed in LemMinx, I have add a comment in |
We should never build workarounds if we know a better and affordable way to have a propoer fix. |
@mickaelistria I'll try doing an upstream fix for this |
Perhaps we should remove the workaround from this patch, keep the test but disable it with JUnit @ ignore, and then I can validate the upstream fix addresses the issue and reenable the test? |
Let's comment where the workaround is with a link to upstream issue, and a note that this can be removed when we move to newer lemminx. Moving to newer LemMinX requires also orchestration with a release of Wild Web Developer, so we can't just switch it too fast without planning. |
Sounds good to me, @pauldpong would you mind updating the PR accordingly with a link to eclipse-lemminx/lemminx#723 (comment)? We can then merge this finally |
cleaner completion Signed-off-by: Paul D'Pong <[email protected]>
Done! |
Looks great to me, thanks @pauldpong !!! :D |