-
Notifications
You must be signed in to change notification settings - Fork 182
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
Font-lock confused by apparent float suffix in non-decimal literal #540
Comments
Can you check if it works with tree sitter mode: https://github.com/rust-lang/rust-mode?tab=readme-ov-file#tree-sitter ? |
I got tree-sitter mode working, but... the syntax highlighting colors the entire number the same way and no longer highlights the prefix! So technically this fixes the bug, but not in the desired way. :-P |
Ah, I see. :-) I see the same behavior using LSP's semantic tokens too. I would recommend opening a bug report in Emacs for this. |
Can you tell me more about why this would be an Emacs bug? It seems specific to Rust syntax. (As it's a minor thing, I'm not super likely to file another bug, but I'm curious.) |
IIUC, Tree sitter is part of Emacs: https://www.gnu.org/software/emacs/manual/html_node/elisp/Language-Grammar.html |
The string
0xf64
is a hex literal (for the number 3940), but rust-mode highlights thef64
as a type suffix, making it appear to be a floating point number. This also happens when there are leading digits, such as in0x1234f64
.Not a huge deal, but maybe something that you want to fix.
The text was updated successfully, but these errors were encountered: