From be8e77013e87387c7e6974a17e8af2b7c1a5774d Mon Sep 17 00:00:00 2001 From: Jen-Chieh Shen Date: Tue, 10 Oct 2023 16:55:25 -0700 Subject: [PATCH] fix: HLSL highlighting (#266) * fix: HLSL highlighting * changelog --- CHANGELOG.md | 1 + queries/hlsl/highlights.scm | 5 ----- tree-sitter-langs.el | 7 ++++--- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 66b0903a..09153ce3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ## Unreleased +- Fix `HLSL` highlighting ## 0.12.64 - 2023-10-10 - Add `Common Lisp` support diff --git a/queries/hlsl/highlights.scm b/queries/hlsl/highlights.scm index 68e9e44b..46bd7917 100644 --- a/queries/hlsl/highlights.scm +++ b/queries/hlsl/highlights.scm @@ -26,10 +26,5 @@ "triangle" ] @type.qualifier -( - (identifier) @variable.builtin - (#lua-match? @variable.builtin "^SV_") -) - (hlsl_attribute) @attribute (hlsl_attribute ["[" "]"] @attribute) diff --git a/tree-sitter-langs.el b/tree-sitter-langs.el index 20315d95..19d3dcf3 100644 --- a/tree-sitter-langs.el +++ b/tree-sitter-langs.el @@ -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))