You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After a brief period using Helix and coming back to Emacs I noticed that Helix highlights more stuff than this mode.
Helix:
Emacs:
(there could be other differences I didn't notice, I tried looking for where this is defined in the Helix source without luck)
What do you think about supporting this? Personally I believe I prefer the Helix way.
I tried adding the following font lock rules and it seems to behave as Helix.
Should I create new features or use an existing one? Two new ones?
In case, should we add a new list to treesit-font-lock-feature-list or add these features to the last one?
Which faces? Looking at the default font lock faces I can't find anything that makes sense with "formal" nodes (function arguments) and "attrpath" nodes so in the example above I used two faces that shouldn't be used for Nix
The more highlighting, the better, IMO. Emacs treesit supports configurable font lock levels via the standard treesit-font-lock-level variable, so my view is that when that variable is set to 4 (the max) we should highlight as much as possible — there's an entry in treesit-font-lock-feature-list for each level, so the approach here would be to add more items to that final (4th) list. The faces you picked seem fine to me, and defining new features is the way to go.
After a brief period using Helix and coming back to Emacs I noticed that Helix highlights more stuff than this mode.
Helix:
Emacs:
(there could be other differences I didn't notice, I tried looking for where this is defined in the Helix source without luck)
What do you think about supporting this? Personally I believe I prefer the Helix way.
I tried adding the following font lock rules and it seems to behave as Helix.
My questions are:
treesit-font-lock-feature-list
or add these features to the last one?@remi-gelinas @purcell I can open PR if you like this
EDIT: just noticed that there other finer highlights provided by Helix, if you like the idea I'll prepare a draft PR with all the ones I find
The text was updated successfully, but these errors were encountered: