emacs-tree-sitter / elisp-tree-sitter

Emacs Lisp bindings for tree-sitter
https://emacs-tree-sitter.github.io
MIT License
816 stars 73 forks source link

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

Open stevemolitor opened 2 years ago

stevemolitor commented 2 years ago

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)])