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

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

[nongnu] elpa/treesit-fold 581af904c1 286/417: feat: Add GDScript suppor


From: ELPA Syncer
Subject: [nongnu] elpa/treesit-fold 581af904c1 286/417: feat: Add GDScript support (#72)
Date: Mon, 1 Jul 2024 10:02:36 -0400 (EDT)

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

    feat: Add GDScript support (#72)
    
    * feat: Add GDScript support
    
    * mk same line
---
 CHANGELOG.md       | 1 +
 README.md          | 2 +-
 ts-fold-parsers.el | 7 +++++++
 ts-fold-summary.el | 1 +
 ts-fold.el         | 1 +
 5 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4ed86936d9..f6484643f5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -30,6 +30,7 @@ Check [Keep a Changelog](http://keepachangelog.com/) for 
recommendations on how
 * fix: Don't fold lint comment when only 1 line (#69) 
 * Add Kotlin support (#70)
 * Add Jai support (#71)
+* Add GDScript support (#72)
 
 ## 0.1.0
 > Released Oct 18, 2021
diff --git a/README.md b/README.md
index 086ef36680..d672124256 100644
--- a/README.md
+++ b/README.md
@@ -121,7 +121,7 @@ These languages are fairly complete:
 - C / C++ / C# / Clojure / CSS
 - Dart
 - Elisp / Elixir
-- Go
+- GDScript / Go
 - Haskell / HTML
 - Jai / Java / JavaScript / JSX / JSON / Julia
 - Kotlin
diff --git a/ts-fold-parsers.el b/ts-fold-parsers.el
index 5e33767f36..aea981c903 100644
--- a/ts-fold-parsers.el
+++ b/ts-fold-parsers.el
@@ -159,6 +159,13 @@
          (ts-fold-range-line-comment node offset "#")))
     (do_block . ts-fold-range-elixir)))
 
+(defun ts-fold-parsers-gdscript ()
+  "Rule set for GGScript."
+  '((body . (ts-fold-range-seq -1 1))
+    (comment
+     . (lambda (node offset)
+         (ts-fold-range-line-comment node offset "#")))))
+
 (defun ts-fold-parsers-go ()
   "Rule set for Go."
   '((block                  . ts-fold-range-seq)
diff --git a/ts-fold-summary.el b/ts-fold-summary.el
index 78bd488e2b..642059a043 100644
--- a/ts-fold-summary.el
+++ b/ts-fold-summary.el
@@ -212,6 +212,7 @@ type of content by checking the word boundary's existence."
     (css-mode          . ts-fold-summary-javadoc)
     (dart-mode         . ts-fold-summary-javadoc)
     (emacs-lisp-mode   . ts-fold-summary-elisp)
+    (gdscript-mode     . ts-fold-summary-ruby-doc)
     (go-mode           . ts-fold-summary-go)
     (haskell-mode      . ts-fold-summary-lua-doc)
     (html-mode         . ts-fold-summary-xml)
diff --git a/ts-fold.el b/ts-fold.el
index 2d787c3389..bf71cf40f1 100644
--- a/ts-fold.el
+++ b/ts-fold.el
@@ -70,6 +70,7 @@
     (emacs-lisp-mode . ,(ts-fold-parsers-elisp))
     (elixir-mode     . ,(ts-fold-parsers-elixir))
     (ess-r-mode      . ,(ts-fold-parsers-r))
+    (gdscript-mode   . ,(ts-fold-parsers-gdscript))
     (go-mode         . ,(ts-fold-parsers-go))
     (haskell-mode    . ,(ts-fold-parsers-haskell))
     (html-mode       . ,(ts-fold-parsers-html))



reply via email to

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