[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Comments to the new tree sitter implementation
From: |
Theodor Thornhill |
Subject: |
Re: Comments to the new tree sitter implementation |
Date: |
Tue, 26 Apr 2022 08:38:01 +0200 |
Yuan Fu <casouri@gmail.com> writes:
>
> That is intended. Maybe I should emphasize in the manual that major
> modes shouldn’t set regex font-locks if tree-sitter is enabled (added
> to todo list). I left regex font-lock enabled and to have higher
> precedence because many Emacs features uses regex font-lock for
> arbitrary highlighting. One example is highlight-regexp, but also
> highlights for outline, and packages like hl-todo, rainbow-mode,
> etc. It makes sense for their highlights to override the “base”
> highlight applied by tree-sitter.
>
Yeah, you're probably correct
>
> IIUC this can be solved by disabling the syntax-table-based font-locking by
> setting KEYWORDS-ONLY in font-lock-defaults.
>
Thanks!
Theodor