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

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

[nongnu] elpa/treesit-fold 1d8d9352a1 369/417: feat: Add Svelte support


From: ELPA Syncer
Subject: [nongnu] elpa/treesit-fold 1d8d9352a1 369/417: feat: Add Svelte support
Date: Mon, 1 Jul 2024 10:03:05 -0400 (EDT)

branch: elpa/treesit-fold
commit 1d8d9352a1b04e5082a224d5800b6898b9f18831
Author: JenChieh <jcs090218@gmail.com>
Commit: Jen-Chieh Shen <jcs090218@gmail.com>

    feat: Add Svelte support
---
 CHANGELOG.md       | 1 +
 README.md          | 2 +-
 ts-fold-parsers.el | 4 ++++
 ts-fold-summary.el | 1 +
 ts-fold.el         | 1 +
 5 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 43d354d9a3..cf2017a627 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,7 @@ Check [Keep a Changelog](http://keepachangelog.com/) for 
recommendations on how
 * Add `LLVM MIR` support (#108)
 * Add `MATLAB` support (#110)
 * Add `Ninja` support (#112)
+* Add `Svelte` support (#113)
 
 ## 0.3.0
 > Released Nov 29, 2023
diff --git a/README.md b/README.md
index bdf8a35874..5a46bf61d4 100644
--- a/README.md
+++ b/README.md
@@ -129,7 +129,7 @@ These languages are fairly complete:
 - OCaml / Org
 - Perl / PHP / Python
 - R / Ruby / Rust / reStructuredText
-- Scala / Scheme / SQL / Swift
+- Scala / Scheme / SQL / Svelte / Swift
 - TOML / TypeScript / TSX
 - Verilog / VHDL
 - XML
diff --git a/ts-fold-parsers.el b/ts-fold-parsers.el
index 02bce3f512..aab43005b4 100644
--- a/ts-fold-parsers.el
+++ b/ts-fold-parsers.el
@@ -586,6 +586,10 @@
     (list       . ts-fold-range-seq)
     (marginalia . ts-fold-range-c-like-comment)))  ; This is the comment!
 
+(defun ts-fold-parsers-svelte ()
+  "Rule set for Svelte."
+  (append (ts-fold-parsers-html)))
+
 (defun ts-fold-parsers-swift ()
   "Rule set for Swift."
   '((switch_statement      . ts-fold-range-seq)
diff --git a/ts-fold-summary.el b/ts-fold-summary.el
index 7aa45e2d56..515b67cd20 100644
--- a/ts-fold-summary.el
+++ b/ts-fold-summary.el
@@ -295,6 +295,7 @@ type of content by checking the word boundary's existence."
     (scheme-mode            . ts-fold-summary-elisp)
     (sh-mode                . ts-fold-summary-javadoc)
     (sql-mode               . ts-fold-summary-c)
+    (svelte-mode            . ts-fold-summary-xml)
     (swift-mode             . ts-fold-summary-c)
     (tablegen-mode          . ts-fold-summary-javadoc)
     (toml-mode              . ts-fold-summary-javadoc)
diff --git a/ts-fold.el b/ts-fold.el
index ab2e8faa2b..cfc3cdd3f4 100644
--- a/ts-fold.el
+++ b/ts-fold.el
@@ -134,6 +134,7 @@
     (sh-mode                . ,(ts-fold-parsers-bash))
     (scala-mode             . ,(ts-fold-parsers-scala))
     (sql-mode               . ,(ts-fold-parsers-sql))
+    (svelte-mode            . ,(ts-fold-parsers-svelte))
     (swift-mode             . ,(ts-fold-parsers-swift))
     (tablegen-mode          . ,(ts-fold-parsers-tablegen))
     (toml-mode              . ,(ts-fold-parsers-toml))



reply via email to

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