emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/treesit-fold 42d059d7db 314/417: feat: Add HLSL support (#


From: ELPA Syncer
Subject: [nongnu] elpa/treesit-fold 42d059d7db 314/417: feat: Add HLSL support (#93)
Date: Mon, 1 Jul 2024 10:02:57 -0400 (EDT)

branch: elpa/treesit-fold
commit 42d059d7db1944aca6022e7d124fa19bdbf3d5ff
Author: Jen-Chieh Shen <jcs090218@gmail.com>
Commit: GitHub <noreply@github.com>

    feat: Add HLSL support (#93)
---
 CHANGELOG.md       | 1 +
 README.md          | 2 +-
 ts-fold-parsers.el | 6 ++++++
 ts-fold-summary.el | 1 +
 ts-fold.el         | 1 +
 5 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index d04dc59a78..f97487418a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -23,6 +23,7 @@ Check [Keep a Changelog](http://keepachangelog.com/) for 
recommendations on how
 * Add Make support (#90)
 * Add SQL support (#91)
 * Add Common Lisp support (#92)
+* Add HLSL support (#93)
 
 ## 0.2.0
 > Released Sep 01, 2023
diff --git a/README.md b/README.md
index 872c49c51b..e7ca946c54 100644
--- a/README.md
+++ b/README.md
@@ -118,7 +118,7 @@ These languages are fairly complete:
 - Dart
 - Elisp / Elixir / Erlang
 - GDScript / Go
-- Haskell / HTML
+- Haskell / HLSL / HTML
 - Jai / Java / JavaScript / JSX / JSON / Jsonnet / Julia
 - Kotlin
 - LaTex / Lisp / Lua
diff --git a/ts-fold-parsers.el b/ts-fold-parsers.el
index 0974e6ad6c..efed4c5ed8 100644
--- a/ts-fold-parsers.el
+++ b/ts-fold-parsers.el
@@ -226,6 +226,12 @@
   '((function . ts-fold-range-haskell-function)
     (comment  . ts-fold-range-lua-comment)))
 
+(defun ts-fold-parsers-hlsl ()
+  "Rule set for HLSL."
+  '((field_declaration_list . ts-fold-range-seq)
+    (compound_statement     . ts-fold-range-seq)
+    (comment                . ts-fold-range-c-like-comment)))
+
 (defun ts-fold-parsers-html ()
   "Rule set for HTML."
   '((element . ts-fold-range-html)
diff --git a/ts-fold-summary.el b/ts-fold-summary.el
index dd341799bf..ab31b33812 100644
--- a/ts-fold-summary.el
+++ b/ts-fold-summary.el
@@ -236,6 +236,7 @@ type of content by checking the word boundary's existence."
     (gdscript-mode          . ts-fold-summary-ruby-doc)
     (go-mode                . ts-fold-summary-go)
     (haskell-mode           . ts-fold-summary-lua-doc)
+    (hlsl-mode              . ts-fold-summary-c)
     (html-mode              . ts-fold-summary-xml)
     (jai-mode               . ts-fold-summary-c)
     (java-mode              . ts-fold-summary-javadoc)
diff --git a/ts-fold.el b/ts-fold.el
index 40ab8da53a..45cb836da9 100644
--- a/ts-fold.el
+++ b/ts-fold.el
@@ -79,6 +79,7 @@
     (gdscript-mode          . ,(ts-fold-parsers-gdscript))
     (go-mode                . ,(ts-fold-parsers-go))
     (haskell-mode           . ,(ts-fold-parsers-haskell))
+    (hlsl-mode              . ,(ts-fold-parsers-hlsl))
     (html-mode              . ,(ts-fold-parsers-html))
     (jai-mode               . ,(ts-fold-parsers-jai))
     (java-mode              . ,(ts-fold-parsers-java))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]