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

Fixed FileCompletionItem to replace the entire node value for cleaner completion #127

Merged
merged 1 commit into from
Aug 11, 2020
Merged

Conversation

pauldpong
Copy link
Contributor

  • 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

@pauldpong pauldpong changed the title Fixed FileCompletionItem to replace the entire node value for more cleaner completion Fixed FileCompletionItem to replace the entire node value for cleaner completion Jul 31, 2020
Copy link
Contributor

@mickaelistria mickaelistria left a 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?

@angelozerr
Copy link
Contributor

I wonder if this problem comes from LemMinx eclipse-lemminx/lemminx#723 ?

@pauldpong
Copy link
Contributor Author

pauldpong commented Aug 4, 2020

Can you please add a test that reproduces the issue ans ensure the patch fixes it?

Yep, added a test that make sure that the replace range for file completion is the entire text node. @mickaelistria

I wonder if this problem comes from LemMinx eclipse/lemminx#723 ?

I believe so. Should this fix go through as a temporary fix or should we just wait for that bug to be fixed?

@angelozerr
Copy link
Contributor

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
eclipse-lemminx/lemminx#723 (comment)

@mickaelistria
Copy link
Contributor

Should this fix go through as a temporary fix or should we just wait for that bug to be fixed?

We should never build workarounds if we know a better and affordable way to have a propoer fix.
If you're interested, you can try to submit a PR for the LemMinX bug. Or maybe @AObuchow is insterested?

@AObuchow
Copy link
Contributor

AObuchow commented Aug 5, 2020

@mickaelistria I'll try doing an upstream fix for this

@AObuchow
Copy link
Contributor

AObuchow commented Aug 7, 2020

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?

@mickaelistria
Copy link
Contributor

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.

@AObuchow
Copy link
Contributor

AObuchow commented Aug 7, 2020

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

@pauldpong
Copy link
Contributor Author

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#723 (comment)? We can then merge this finally

Done!

@AObuchow
Copy link
Contributor

Looks great to me, thanks @pauldpong !!! :D

@AObuchow AObuchow merged commit f0de156 into eclipse-lemminx:master Aug 11, 2020
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

Successfully merging this pull request may close these issues.

4 participants