Skip to content

Commit

Permalink
fix: HLSL highlighting (#266)
Browse files Browse the repository at this point in the history
* fix: HLSL highlighting

* changelog
  • Loading branch information
jcs090218 authored Oct 10, 2023
1 parent 718e564 commit be8e770
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## Unreleased
- Fix `HLSL` highlighting

## 0.12.64 - 2023-10-10
- Add `Common Lisp` support
Expand Down
5 changes: 0 additions & 5 deletions queries/hlsl/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,5 @@
"triangle"
] @type.qualifier

(
(identifier) @variable.builtin
(#lua-match? @variable.builtin "^SV_")
)

(hlsl_attribute) @attribute
(hlsl_attribute ["[" "]"] @attribute)
7 changes: 4 additions & 3 deletions tree-sitter-langs.el
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,11 @@ Return nil if there are no bundled patterns."
;; TODO: Make this less ad-hoc.
(dolist (sym (cons lang-symbol
(pcase lang-symbol
('cpp '(c))
('cpp '(c))
('hlsl '(cpp c))
('typescript '(javascript))
('tsx '(typescript javascript))
(_ nil))))
('tsx '(typescript javascript))
(_ nil))))
(when mode
(ignore-error 'file-missing
(insert-file-contents (tree-sitter-langs--hl-query-path sym mode))
Expand Down

0 comments on commit be8e770

Please sign in to comment.