Skip to content

Commit

Permalink
Fix ordering of cpp/c highlights
Browse files Browse the repository at this point in the history
This way cpp highlights get proper precedence
  • Loading branch information
th0rex committed Dec 31, 2019
1 parent beac25e commit 2ae22c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tree-sitter-highlight.el
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ to faces. Each function takes no arguments."
"Parse a highlights.scm file and return a query."
(let* ((highlights (when tree-sitter-highlight-query-dir
(if (eql language 'cpp)
(concat (tree-sitter-highlight--read-file 'c "highlights.scm")
(tree-sitter-highlight--read-file language "highlights.scm"))
(concat (tree-sitter-highlight--read-file language "highlights.scm")
(tree-sitter-highlight--read-file 'c "highlights.scm"))
(or (tree-sitter-highlight--read-file language "highlights.scm")
(error "No highlights found for %s" language)))))
(injections (when tree-sitter-highlight-query-dir
Expand Down

0 comments on commit 2ae22c4

Please sign in to comment.