GNU bug report logs -
#70361
[PATCH] Add font-locking for operators in go-ts-mode.
Previous Next
Reported by: Noah Peart <noah.v.peart <at> gmail.com>
Date: Sat, 13 Apr 2024 05:24:03 UTC
Severity: normal
Tags: patch
Done: Yuan Fu <casouri <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
> What problems do you see with the current approach that would require
more fine-grained user control?
The main issue for me is removing the `error` feature from any mode
that adds it with `:override t`. I find the override font-locking is
jarring - in some
Languages half the buffer can switch in and out of parse errors when you
do something as simple as removing a closing paren.
Also, allowing users to rearrange features at different levels seems like a
bonus.
> And why do you think a defvar is the proper way of providing such control?
You're right, I don't think it's the best way - it's just what I've been
doing in
treesit modes I've written till now.
On Sat, Apr 13, 2024 at 12:40 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
> > From: Noah Peart <noah.v.peart <at> gmail.com>
> > Date: Sat, 13 Apr 2024 00:32:59 -0700
> > Cc: 70361 <at> debbugs.gnu.org
> >
> > On a somewhat related note, I was wondering why the treesit modes in
> emacs
> > define their `treesit-font-lock-feature-list`s in the mode definitions.
> >
> > Wouldn't it be more user-friendly to `defvar` the feature list?
>
> AFAIR, we do that in the mode's settings because the translation of
> general categories into mode-specific settings is not easy, and
> because we want users to control that via the fontification level, not
> below that.
>
> What problems do you see with the current approach that would require
> more fine-grained user control? And why do you think a defvar is the
> proper way of providing such control?
>
[Message part 2 (text/html, inline)]
This bug report was last modified 1 year and 33 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.