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

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

[nongnu] elpa/treesit-fold a9d4c2ec53 296/417: feat: Add XML support (#8


From: ELPA Syncer
Subject: [nongnu] elpa/treesit-fold a9d4c2ec53 296/417: feat: Add XML support (#80)
Date: Mon, 1 Jul 2024 10:02:38 -0400 (EDT)

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

    feat: Add XML support (#80)
---
 CHANGELOG.md       | 1 +
 README.md          | 5 ++---
 ts-fold-parsers.el | 5 +++++
 ts-fold.el         | 1 +
 4 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0dec1f9837..07f19359e9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,7 @@ Check [Keep a Changelog](http://keepachangelog.com/) for 
recommendations on how
 * Add Noir support (#77)
 * Improve Elixir UX (#78)
 * Add VHDL support (#79)
+* Add XML support (#80)
 
 ## 0.2.0
 > Released Sep 01, 2023
diff --git a/README.md b/README.md
index 22c8ee762c..12e2da011d 100644
--- a/README.md
+++ b/README.md
@@ -123,20 +123,19 @@ These languages are fairly complete:
 - LaTex / Lua
 - Markdown
 - Nix / Noir
+- OCaml
 - Perl / PHP / Python
 - R / Ruby / Rust
 - Scala / Scheme / Swift
 - TOML / TypeScript / TSX
 - Verilog / VHDL
+- XML
 - YAML
 
 These languages are in development:
 
 - Agda
 - Elm
-- Noir
-- OCaml
-- XML (upstream)
 
 ## 📝 Customization
 
diff --git a/ts-fold-parsers.el b/ts-fold-parsers.el
index 148fb4312f..84145cd090 100644
--- a/ts-fold-parsers.el
+++ b/ts-fold-parsers.el
@@ -419,6 +419,11 @@
     (enumeration_type_definition . ts-fold-range-seq)
     (comment                     . ts-fold-range-lua-comment)))
 
+(defun ts-fold-parsers-xml ()
+  "Rule set for XML."
+  '((element . ts-fold-range-html)
+    (Comment . (ts-fold-range-seq 3 -2))))
+
 (defun ts-fold-parsers-yaml ()
   "Rule set for YAML."
   '((comment
diff --git a/ts-fold.el b/ts-fold.el
index e39fc3b8d6..79821d834d 100644
--- a/ts-fold.el
+++ b/ts-fold.el
@@ -108,6 +108,7 @@
     (typescript-mode . ,(ts-fold-parsers-typescript))
     (verilog-mode    . ,(ts-fold-parsers-verilog))
     (vhdl-mode       . ,(ts-fold-parsers-vhdl))
+    (nxml-mode       . ,(ts-fold-parsers-xml))
     (yaml-mode       . ,(ts-fold-parsers-yaml)))
   "An alist of (major-mode . (foldable-node-type . function)).
 



reply via email to

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