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

Have tree-sitter-hl-mode set `font-lock-defaults` to dummy value #232

Open lambdadog opened 2 years ago

lambdadog commented 2 years ago

This isn't an issue with existing modes, since they typically already include font-lock highlighting, but while writing my own mode backed by tree-sitter, I found that it was necessary to set font-lock-defaults to a dummy value (I eventually landed on '(('t))) for tree-sitter-hl-mode to perform highlighting.

Ideally, if font-lock-defaults was unset, tree-sitter-hl-mode could just set this value when enabled.