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

textDocument/complete: Pass TextEdit instead of static text #133

Merged
merged 1 commit into from
Jun 4, 2020

Conversation

radeksimko
Copy link
Member

Depends on #132


This seemingly small change has a positive effect on the UX while completing in the middle of an existing token, where clients can correctly highlight parts of completion candidates.

Before

Screenshot 2020-06-03 at 09 08 42

Screenshot 2020-06-03 at 09 14 06

After

Screenshot 2020-06-03 at 09 08 06

Screenshot 2020-06-03 at 09 13 34


As mentioned in the comment in code, this doesn't work (yet) for block types (e.g. resource, data, provider). It probably should, but some refactoring is necessary to make that work and realistically changing of block type is far less likely to occur in real scenarios, so it's ok to take on that tech debt.

Copy link
Contributor

@paultyng paultyng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor refactoring note, but functionally looks good.

@radeksimko radeksimko merged commit aa8f5e8 into master Jun 4, 2020
@radeksimko radeksimko deleted the f-text-edit branch June 4, 2020 09:29
@ghost
Copy link

ghost commented Jul 4, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the context necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Jul 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants