GNU bug report logs -
#77914
31.0.50; treesit-font-lock-level set to 4 cause rust-ts-mode lost all color
Previous Next
Full log
View this message in rfc822 format
> To reproduce this: use this rust file:
>
> Then eval:
> 1. (progn (setq treesit-font-lock-level 4) (revert-buffer))
> all color are lost.
>
> 2. (progn (setq treesit-font-lock-level 3) (revert-buffer))
> colors are good. !Important, level 3 is good, but level 4 lost colors.
>
> 3. (progn (setq treesit-font-lock-level 4) (revert-buffer))
> all color are lost again.
The treesit-font-lock-level 4 contains the symbol 'error',
therefore it adds highlighting of the ERROR nodes.
At level 3 there are still errors, but whey are not highlighted.
Removing the macro removes the errors.
So if you are sure that the file is correct,
you can report the issue to the authors of
https://github.com/tree-sitter/tree-sitter-rust
Then they can answer why everything in the first macro
is the error:
(ERROR
(ERROR (identifier))
(identifier) {
(ERROR ( $ ()
(attribute_item # [
(ERROR $ ()
(attribute (metavariable))
(ERROR : tt ) *)
])
(ERROR ) * (metavariable) : ident)
(identifier)
(ERROR $ ( { $ ( (metavariable) :
(try_expression (identifier)
(ERROR ) * } ))
?)
(metavariable) : (identifier)
(ERROR $)
(
(ERROR , $)
( (metavariable))
:
(ERROR
(try_expression (identifier)
(ERROR ) * ))
?)
) => { $)
This bug report was last modified 56 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.