Open timmc opened 2 months ago
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.