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

Exotic identifiers #710

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

cknitt
Copy link
Member

@cknitt cknitt commented Jan 22, 2023

Here are some test cases for #598.

So far, I was able to fix only a part of them and could use help with the rest.

Copy link
Collaborator

@zth zth left a comment

Choose a reason for hiding this comment

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

Looing good. A few small comments. Rest of the work is mostly just about finding all the places this needs to be done at.

Comment on lines +1093 to +1096
let fname =
PrintType.printIdentLike ~allowUident:false field.fname.txt
in
Completion.create fname
Copy link
Collaborator

Choose a reason for hiding this comment

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

One idea is to not use the name field for this, but instead the insertText field. That'll make the name appear normal in the completion list, but it's the escaped identifier that'll be insterted. What do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

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

We can also consider whether this should be done inside of Completion.create directly. Probably not though, as there are quite a few instances where it shouldn't be escaped even when there are exotic characters in there (like with variant payloads, Some(whatver)).

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.

2 participants