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

How to stop italics in tree-sitter's syntax highlighting? #124

Closed ianyepan closed 3 years ago

ianyepan commented 3 years ago

First of all, thanks for porting tree-sitter to Emacs -- I only recently discovered it and it's super awesome.

Issue

How can I stop the method calls to be italicized as in the following screenshot? These keywords were not italics before I switched to using tree-sitter for its superior syntax highlighting.

Screenshot

image

ubolonton commented 3 years ago

You can put the point on the highlighted text and evaluate (get-text-property (point) 'face) to see what's the face used. Then you can customize that face to remove the :slant attribute.

In this case, it's probably the face tree-sitter-hl-face:property.