Skip to content

Commit

Permalink
feat: Add HLSL support (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 authored Oct 10, 2023
1 parent 38c9f9b commit a8b8124
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -454,3 +454,9 @@
branch = master
update = none
ignore = dirty
[submodule "repos/hlsl"]
path = repos/hlsl
url = https://github.com/theHamsta/tree-sitter-hlsl
branch = master
update = none
ignore = dirty
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## Unreleased
- Add `HLSL` support

## 0.12.62 - 2023-10-10
- Add `GLSL` support
Expand Down
35 changes: 35 additions & 0 deletions queries/hlsl/highlights.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
; inherits: cpp

[
"in"
"out"
"inout"
"uniform"
"shared"
"groupshared"
"discard"
"cbuffer"
"row_major"
"column_major"
"globallycoherent"
"centroid"
"noperspective"
"nointerpolation"
"sample"
"linear"
"snorm"
"unorm"
"point"
"line"
"triangleadj"
"lineadj"
"triangle"
] @type.qualifier

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

(hlsl_attribute) @attribute
(hlsl_attribute ["[" "]"] @attribute)
1 change: 1 addition & 0 deletions repos/hlsl
Submodule hlsl added at 45e60a
1 change: 1 addition & 0 deletions tree-sitter-langs-build.el
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ infrequent (grammar-only changes). It is different from the version of

(defconst tree-sitter-langs--langs-with-deps
'( cpp
hlsl
glsl
typescript
toml)
Expand Down
1 change: 1 addition & 0 deletions tree-sitter-langs.el
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ See `tree-sitter-langs-repos'."
(haskell-mode . haskell)
(hcl-mode . hcl)
(terraform-mode . hcl)
(hlsl-mode . hlsl)
(html-mode . html)
(markdown-mode . markdown)
(mhtml-mode . html)
Expand Down

0 comments on commit a8b8124

Please sign in to comment.