Skip to main content
3 votes
Accepted

How does emacs/eglot decide which syntax element to highlight and how could I change it?

Every buffer has one "major mode" which determines what Emacs will do to best support editing that particular language. See chapter 24.1 Major Modes in the Emacs manual for more information. ...
db48x's user avatar
  • 18.4k
2 votes

Better accuracy syntax highlighting

If you're using at least Emacs 29.1 then I suggest reading https://www.masteringemacs.org/article/how-to-get-started-tree-sitter to learn how you can get up and running with the new major modes ...
phils's user avatar
  • 51.7k
2 votes

org-mode: example blocks are no longer syntax highlighted in emacs

Indeed, 9.6.1 fontifies such blocks and latest does not. A git bisection found this commit: commit 616e80a9f10c4bd085d7b5ac96fd6ea23e9c9191 Author: <elided> Date: Thu Apr 6 08:49:20 2023 -0500 ...
NickD's user avatar
  • 31k
1 vote
Accepted

How enable tree-sitter modes (*-ts-mode) that aren't built-in?

Someone has to write one. “language specific tree-sitter major mode wont show up” is a similar question, with an answer that goes into more detail about what needs to be written.
db48x's user avatar
  • 18.4k
1 vote

How to highlight specific keywords inside strings/quotes?

The modern method is to use polymode. For example if you always use prepare(" before SQL statements, M-x package-install polymode and use this config: (use-package polymode :mode ("\.php$&...
unhammer's user avatar
  • 1,169

Only top scored, non community-wiki answers of a minimum length are eligible