[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/treesit-fold a474fd6b42 285/417: feat: Add Jai support (#7
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/treesit-fold a474fd6b42 285/417: feat: Add Jai support (#71) |
Date: |
Mon, 1 Jul 2024 10:02:36 -0400 (EDT) |
branch: elpa/treesit-fold
commit a474fd6b4250d51350d7050c9726059716997098
Author: Jen-Chieh Shen <jcs090218@gmail.com>
Commit: GitHub <noreply@github.com>
feat: Add Jai support (#71)
* feat: Add Jai support
* Changelog
---
CHANGELOG.md | 1 +
README.md | 2 +-
ts-fold-parsers.el | 10 +++++++++-
ts-fold-summary.el | 1 +
ts-fold.el | 4 +++-
5 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ea50db0e23..4ed86936d9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -29,6 +29,7 @@ Check [Keep a Changelog](http://keepachangelog.com/) for
recommendations on how
* Add TOML support (#68)
* fix: Don't fold lint comment when only 1 line (#69)
* Add Kotlin support (#70)
+* Add Jai support (#71)
## 0.1.0
> Released Oct 18, 2021
diff --git a/README.md b/README.md
index 5c8bb1069d..086ef36680 100644
--- a/README.md
+++ b/README.md
@@ -123,7 +123,7 @@ These languages are fairly complete:
- Elisp / Elixir
- Go
- Haskell / HTML
-- Java / JavaScript / JSX / JSON / Julia
+- Jai / Java / JavaScript / JSX / JSON / Julia
- Kotlin
- Lua
- Markdown
diff --git a/ts-fold-parsers.el b/ts-fold-parsers.el
index 24412c5e68..5e33767f36 100644
--- a/ts-fold-parsers.el
+++ b/ts-fold-parsers.el
@@ -180,6 +180,13 @@
'((element . ts-fold-range-html)
(comment . (ts-fold-range-seq 1 -1))))
+(defun ts-fold-parsers-jai ()
+ "Rule set for Jai."
+ '((imperative_scope . ts-fold-range-seq)
+ (data_scope . ts-fold-range-seq)
+ (block_comment . ts-fold-range-block-comment)
+ (inline_comment . ts-fold-range-c-like-comment)))
+
(defun ts-fold-parsers-java ()
"Rule set for Java."
'((switch_block . ts-fold-range-seq)
@@ -192,7 +199,8 @@
(annotation_type_body . ts-fold-range-seq)
(interface_body . ts-fold-range-seq)
(array_initializer . ts-fold-range-seq)
- (block_comment . (ts-fold-range-seq 1 -1))))
+ (block_comment . ts-fold-range-block-comment)
+ (line_comment . ts-fold-range-c-like-comment)))
(defun ts-fold-parsers-javascript ()
"Rule set for JavaScript."
diff --git a/ts-fold-summary.el b/ts-fold-summary.el
index 61bddad8d3..78bd488e2b 100644
--- a/ts-fold-summary.el
+++ b/ts-fold-summary.el
@@ -215,6 +215,7 @@ type of content by checking the word boundary's existence."
(go-mode . ts-fold-summary-go)
(haskell-mode . ts-fold-summary-lua-doc)
(html-mode . ts-fold-summary-xml)
+ (jai-mode . ts-fold-summary-c)
(java-mode . ts-fold-summary-javadoc)
(javascript-mode . ts-fold-summary-javadoc)
(js-mode . ts-fold-summary-javadoc)
diff --git a/ts-fold.el b/ts-fold.el
index 8e93ef4282..2d787c3389 100644
--- a/ts-fold.el
+++ b/ts-fold.el
@@ -73,6 +73,7 @@
(go-mode . ,(ts-fold-parsers-go))
(haskell-mode . ,(ts-fold-parsers-haskell))
(html-mode . ,(ts-fold-parsers-html))
+ (jai-mode . ,(ts-fold-parsers-jai))
(java-mode . ,(ts-fold-parsers-java))
(javascript-mode . ,(ts-fold-parsers-javascript))
(js-mode . ,(ts-fold-parsers-javascript))
@@ -318,7 +319,8 @@ If the current node is not folded or not foldable, do
nothing."
(ts-fold--ensure-ts
(when-let* ((node (ts-fold--foldable-node-at-pos))
(ov (ts-fold-overlay-at node)))
- (delete-overlay ov))))
+ (delete-overlay ov)
+ t)))
;;;###autoload
(defun ts-fold-open-recursively ()
- [nongnu] elpa/treesit-fold 5c45efb2d5 316/417: Update CHANGELOG.md, (continued)
- [nongnu] elpa/treesit-fold 5c45efb2d5 316/417: Update CHANGELOG.md, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold abb1c53bd4 336/417: Bump version for next release, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 544390c602 329/417: fix: Fold line comment with same indentation, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 7fdaf447cc 245/417: Change global mode to turn on with tree-sitter (#41), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 07fe2d17f4 249/417: feature: Add minor-mode for line comment (#45), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 458903e88d 250/417: fix: Fix nil tree-sitter-node, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 6ada31e372 251/417: changelog, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold fbb5510d5c 290/417: feat: Add LaTex support (#76), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 81dc9eff92 283/417: Update CHANGELOG.md, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold f8df121f08 270/417: ci(dependabot): Maintain github-actions, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold a474fd6b42 285/417: feat: Add Jai support (#71),
ELPA Syncer <=
- [nongnu] elpa/treesit-fold 27e8f44fb6 269/417: test: Emacs 29.1, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 7110ff8943 287/417: feat: Add Scheme support (#73), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 999f295bf4 282/417: fix: Don't fold lint comment when only 1 line (#69), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold befad113c9 390/417: feat: Return node when closing, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 9d18dee909 354/417: Added a matlab parser for folding., ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold bfdba4f0a8 339/417: fix PR id, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 56c19e3b2d 351/417: chore: Update changelog and README regarding dev, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 37715b54ee 309/417: feat: Add reStructuredText support (#89), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold a54a3c92fd 315/417: feat: Add GLSL support (#94), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 1827d0aa9e 319/417: perf: Render indicators in display range (#97), ELPA Syncer, 2024/07/01