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

Comprehensive approach to utf-16 positions #244

Closed
axelson opened this issue May 16, 2020 · 4 comments
Closed

Comprehensive approach to utf-16 positions #244

axelson opened this issue May 16, 2020 · 4 comments

Comments

@axelson
Copy link
Member

axelson commented May 16, 2020

#200 added support for utf-16 formatting. However, it can be improved to be more comprehensive and better tested with automated tests. We should also double check that we've gotten all the places that utf-16 translation is needed.

@lukaszsamson
Copy link
Collaborator

lukaszsamson commented Jun 2, 2020

I stumbled on this issue in definition provider. I think it's safe to assume formatting is not the only place that handle this incorrectly. Fortunately this bug rarely manifests.

@lukaszsamson lukaszsamson changed the title Comprehensive approach to utf-16 formatting Comprehensive approach to utf-16 positions Jan 23, 2022
@lukaszsamson
Copy link
Collaborator

I went through the sources and identified many places where we either return incorrect positions or incorrectly pass positions to ElixirSense or other downstream processing. List of possible issues (probably not exhaustive):

  • build diagnostic
  • formatting mayers_difference
  • hover
  • on_type_formatting
  • references
  • definition
  • completion
  • signature_help
  • macro_expansion

Fortunately there is some traction on UTF8 positions support, see microsoft/language-server-protocol#376 (comment)

@axelson
Copy link
Member Author

axelson commented Jan 29, 2022

Yeah, I'm kind of thinking that we drop/deprecated UTF-16 support. I think that the majority of clients that people are using support UTF-8 and that would simplify (and speed up) ElixirLS.

@lukaszsamson
Copy link
Collaborator

I'm closing this one. We'll open a separate issue when utf8 positions are in spec

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

No branches or pull requests

2 participants