-
-
Notifications
You must be signed in to change notification settings - Fork 884
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
Feature Request: UTF-8 support #3344
Comments
ATM we run using utf-8. we should fix #2080 in a way to allow using utf8 when the server supports that. |
I'd love to implement that on clojure-lsp side, although have no clue what would be like the necessary changes |
@yyoncho did you mean to say UTF-16 here? |
Specific improvement here would be to add Lines 3530 to 3625 in b4e8aac
Just signaling support for utf8 should be enough to solve the problems for servers which support utf8 |
I just ran into this issue today, it still crashes rust-analyzer. Can we get at least one of these fixes applied?
|
I’m pretty unclear on the current state of this plugin after reading
through comments on this and the related issues. I understand that right
now this plugin only declares support for UTF-16.
(1) are there any outstanding encoding issues with UTF-16?
(2) does this plugin actually support UTF-8 but just not announce that
support to servers, or does it not actually support UTF-8 (in which case it
should not claim that it does)?
…On Thu, Feb 2, 2023 at 11:41 PM teor ***@***.***> wrote:
I just ran into this issue today, it still crashes rust-analyzer.
Can we get at least one of these fixes applied?
- correct offsets: ***@***.***
<yyoncho@aac9b6a>
- declaring UTF-8 lsp mode: #3344 (comment)
<#3344 (comment)>
—
Reply to this email directly, view it on GitHub
<#3344 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGD5T76JCTEDLX7TX4Z6YTWVSD6TANCNFSM5NUM5MVQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
@ddickstein I'm not a Advertising UTF-8 offset encoding might fix RA, but it's optional, so servers which don't implement it will still have problems. But it fixes our problem, it's better for performance, and the UTF-16 encoding can still be fixed in the future, maybe like in yyoncho@aac9b6a. |
As probably noticed elsewhere, fasterthanli did a writeup of this issue - https://fasterthanli.me/articles/the-bottom-emoji-breaks-rust-analyzer#the-language-server-protocol @yyoncho I hope this is useful and not annoying, thanks for all your help over the years, lsp-mode has been awesome and I've never noticed this bug. |
Can someone using the patch report if there are noticeable perf impact? If no - I will merge it as default option. |
It's incorrect. It seems that the "native" encoding of Emacs is UTF-32, which lsp-mode now advertises. So UTF-8 is still unimplemented, but that's fine from rust-analyzer's point of view because we now support UTF-32. |
It seems likely that a future version of the Language Server Protocol will allow servers and clients to support UTF-8 instead of UTF-16:
microsoft/language-server-protocol#376 (comment)
I'd like to request that
lsp-mode
support UTF-8 as an encoding. One benefit is to avoid #2080 and it will also hopefully have a speed benefit when compared to full UTF-16 support.Rust Analyzer LSP Server has already implemented their own version of UTF-8 negotiation although I don't have a link handy.
The text was updated successfully, but these errors were encountered: