-
-
Notifications
You must be signed in to change notification settings - Fork 106
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
UTF-8 and UTF-32 position encoding support #375
Conversation
e8e4717
to
1ae014c
Compare
90d4734
to
25150a1
Compare
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.
I can't comment on the actual implementation of UTf-8
and UTF-32
support, but overall the approach looks fine to me.
Just added some notes around maintaining backwards compatibility
@tombh I published a build of |
Thanks Karthik, I did see that, thank you so much. I've just been busy and haven't had a chance to update this PR yet. Once this is merged we can make a new release with LSP 3.17 support! |
This commit is only for supporting sending preferred position encoding from the client during startup. Even though this commit introduces the server's ability to choose from the client's list of supported position encodings, it doesn't actually support any other encoding from the existing UTF-16.
Still no actual support for client encodings apart from UTF-16
Contributes to #346
@alcarney I've pushed those changes. Also, because I'm trying to follow strict typing from now on, I made a change to the |
Thanks, they look great!
Does it have to though? Ideally, there shouldn't be anything in I'm sure that is not the reality though! Otherwise you wouldn't have had to update the type annotations! 😄 Otherwise that base Sort of related I've been meaning to post some thoughts in #334 on how we apply what we've learned with the It'll be mid-longer term goal though (probably resulting in a |
That totally makes sense. I've removed the commit for now and just ignored the type. I'll rejig it in the direction you mention another time. For the record these are the methods that need moving:
How interesting! That in emulating a client you've learnt how to improve the server. Really cool. |
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.
Looks good to me! 😄
Awesome thanks! They don't look too bad to fix, |
Yeah, should be pretty easy (touch wood) |
This allows editors to use position encodings other than the default of UTF-16. This contributes to LSP 3.17 support. See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#positionEncodingKind
Code review checklist (for code reviewer to complete)