GNU bug report logs -
#61205
'function' in 3rd element of treesit-font-lock-feature-list
Previous Next
Reported by: Dmitry Gutov <dgutov <at> yandex.ru>
Date: Wed, 1 Feb 2023 02:09:02 UTC
Severity: normal
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
Full log
Message #23 received at 61205 <at> debbugs.gnu.org (full text, mbox):
On Wednesday, February 1st, 2023 at 21:44, Dmitry Gutov <dgutov <at> yandex.ru> wrote:
> On 02/02/2023 04:34, Randy Taylor wrote:
>
> > On Tuesday, January 31st, 2023 at 21:08, Dmitry Gutovdgutov <at> yandex.ru wrote:
> >
> > > X-Debbugs-Cc: Yuan Fucasouri <at> gmail.com, Randy Taylordev <at> rjt.dev
> > >
> > > Some new built-in modes has 'function' feature highlighting thus enabled
> > > by default.
> > >
> > > rust-ts-mode, go-ts-mode, cmake-mode
> > >
> > > Should we move it to 4 for consistency with the rest?
> > >
> > > Previously, we talked about that and concluded that function calls are
> > > usually everywhere and are easy to notice without additional highlighting.
> > > If that's what folks decided on then we should keep everything consistent.
> >
> > Personally, I find it odd that out of the box default highlighting wouldn't highlight function calls.
>
>
> I think that's more useful in some languages, and less in others.
Sure, and people will have different opinions on it too. But I still think out of the box we should be highlighting most things like other editors do. It's easy enough to take out what you don't like.
>
> I guess we settled on this particular convention to be more consistent
> with existing major modes in Emacs. But I can see how it can be
> appealing, especially in languages with more complex syntax such as Rust.
>
> Same for 'property'.
>
> The one feature that I'm fairly certain is currently useless is
> 'variable', because we don't have any variable scope tracking (yet), and
> the grammars don't do it for us. So too many tokens get highlighted with
> font-lock-variable-name-face. Try the current rust-ts-mode, for example:
> almost everything ends up with that face.
If anything that isn't a variable is getting highlighted, then that's a bug. Anything it's catching that isn't a variable can probably be dealt with similar to how token_tree is dealt with.
This bug report was last modified 2 years and 107 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.