emacs-tree-sitter / elisp-tree-sitter

Emacs Lisp bindings for tree-sitter

Home Page:https://emacs-tree-sitter.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tree-sitter-hl-mode highlights JSX / TSX angle brackets as operators

stevemolitor opened this issue · comments

tree-sitter-hl-mode highlights TSX tag delimiters like < are highlighted using tree-sitter-hl-face:operator. I'd like to use a different color for TSX tag delimiters and true operators.

Also the / in closing TSX tags like </ is not highlighted at all.

I verified via describe-face and also C-u C-x = (what-cursor-position with a prefix argument).

I worked around the ">/" font highlighting by adding this in my mode hook but it's kind of a crude hack:

(tree-sitter-hl-add-patterns nil [(("/" ">") @operator)])