Cartier-Tilet: Emacs 29 is nigh
source link: https://lwn.net/Articles/916201/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Cartier-Tilet: Emacs 29 is nigh
In case you didn’t know, Emacs’ current syntax highlighting is currently based on a system of regexes. Although it is not the worst thing to use, it’s not the best either, and it can become quite slow on larger files.TreeSitter parses programming languages based into a concrete syntax tree. From there, not only can syntax highlighting can be done at high speed, but a much deeper analysis of the code is possible and actions such sa syntax manipulation can also be achieved since the syntax tree itself is available as an object which can be manipulated!
(Log in to post comments)
Cartier-Tilet: Emacs 29 is nigh
Posted Nov 29, 2022 15:40 UTC (Tue) by dskoll (subscriber, #1630) [Link]
Oh, I am definitely looking forward to better syntax highlighting! Sometimes the regexes get it wrong and I have to put in something like:
# ' Close quote to keep syntax highlighter happy
if an earlier comment contains the word "don't" or similar.
Cartier-Tilet: Emacs 29 is nigh
Posted Nov 29, 2022 18:06 UTC (Tue) by azaghal (subscriber, #47042) [Link]
Cartier-Tilet: Emacs 29 is nigh
Posted Nov 29, 2022 18:49 UTC (Tue) by madscientist (subscriber, #16861) [Link]
Maybe you're using some language which doesn't have a proper mode defined for it in Emacs?
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK