[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/treesit-fold 8386b5b714 280/417: feat: Add Markdown suppor
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/treesit-fold 8386b5b714 280/417: feat: Add Markdown support (#67) |
Date: |
Mon, 1 Jul 2024 10:02:35 -0400 (EDT) |
branch: elpa/treesit-fold
commit 8386b5b71433200e26adca1651519987b695cfb6
Author: Jen-Chieh Shen <jcs090218@gmail.com>
Commit: GitHub <noreply@github.com>
feat: Add Markdown support (#67)
* feat: Add Markdown support
* changelog
* fix indicators
---
CHANGELOG.md | 1 +
README.md | 6 ++++++
ts-fold-parsers.el | 5 +++++
ts-fold-summary.el | 2 +-
ts-fold.el | 1 +
5 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 70162a3bd1..a047e27820 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -25,6 +25,7 @@ Check [Keep a Changelog](http://keepachangelog.com/) for
recommendations on how
* Add Clojure support (#64)
* Add Haskell support (#65)
* Add Perl support (#66)
+* Add Markdown support (#67)
## 0.1.0
> Released Oct 18, 2021
diff --git a/README.md b/README.md
index 49a6630c1b..7a80c4fd5f 100644
--- a/README.md
+++ b/README.md
@@ -19,6 +19,11 @@ to provide code folding based on the tree-sitter syntax tree.
<!-- markdown-toc start - Don't edit this section. Run M-x
markdown-toc-refresh-toc -->
+<!---
+your comment goes here
+and here
+-->
+
**Table of Contents**
- [💾 Installation](#-installation)
@@ -120,6 +125,7 @@ These languages are fairly complete:
- Haskell / HTML
- Java / JavaScript / JSX / JSON / Julia
- Lua
+- Markdown
- Nix
- Perl / PHP / Python
- R / Ruby / Rust
diff --git a/ts-fold-parsers.el b/ts-fold-parsers.el
index afb6ce6004..14b361b925 100644
--- a/ts-fold-parsers.el
+++ b/ts-fold-parsers.el
@@ -232,6 +232,11 @@
(repeat_statement . ts-fold-range-lua-repeat)
(comment . ts-fold-range-lua-comment)))
+(defun ts-fold-parsers-markdown ()
+ "Rule set for Markdown."
+ '((fenced_code_block . (ts-fold-range-seq 2 -2))
+ (html_block . ts-fold-range-html)))
+
(defun ts-fold-parsers-nix ()
"Rule set for Nix."
'((attrset_expression . ts-fold-range-seq)
diff --git a/ts-fold-summary.el b/ts-fold-summary.el
index e92b8acc0b..63585f4f56 100644
--- a/ts-fold-summary.el
+++ b/ts-fold-summary.el
@@ -154,7 +154,7 @@ type of content by checking the word boundary's existence."
(defun ts-fold-summary-markdown (doc-str)
"Extract summary from DOC-STR in Markdown block."
- (ts-fold-summary--doc-extract doc-str '()))
+ (ts-fold-summary--doc-extract doc-str '("-" "```")))
(defun ts-fold-summary-org (doc-str)
"Extract summary from DOC-STR in Org block."
diff --git a/ts-fold.el b/ts-fold.el
index 0eb0ba7d5a..40338d9ee5 100644
--- a/ts-fold.el
+++ b/ts-fold.el
@@ -82,6 +82,7 @@
(jsonc-mode . ,(ts-fold-parsers-json))
(julia-mode . ,(ts-fold-parsers-julia))
(lua-mode . ,(ts-fold-parsers-lua))
+ (markdown-mode . ,(ts-fold-parsers-markdown))
(nix-mode . ,(ts-fold-parsers-nix))
(ocaml-mode . ,(ts-fold-parsers-ocaml))
(perl-mode . ,(ts-fold-parsers-perl))
- [nongnu] elpa/treesit-fold 33e3fb561e 219/417: docs: changelog, (continued)
- [nongnu] elpa/treesit-fold 33e3fb561e 219/417: docs: changelog, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 17d131f69a 228/417: feat(ocaml): Support for ocaml-mode and caml-mode (#24), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 28409a0cee 232/417: docs: Update repo link (#32), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 017402713b 236/417: Fix typo/grammar in error message (#34), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold fb91989a94 238/417: Setup node is no longer required, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold f581febc6f 243/417: Update README (#39), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold a5ba7ce60b 248/417: README.md: fix typo (#43), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 5b0535c1af 256/417: test(Makefile); Ignore package-lint test, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold cde9c90b07 259/417: docs(README.md): Metnion YAML support, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 5ebe65e85d 262/417: docs: Fix more typo, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 8386b5b714 280/417: feat: Add Markdown support (#67),
ELPA Syncer <=
- [nongnu] elpa/treesit-fold 630b896b3f 277/417: feat: Add Haskell support (#65), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 08abd98ba4 272/417: feat: Add Dart support (#62), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold d20c3663f9 380/417: Update desc, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 2bb351bcf3 385/417: feat: Add on fold hook, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold c14893d4ff 343/417: perf: Use built-in function for indentation, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 858fb6fe1c 325/417: Update CHANGELOG.md, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 581af904c1 286/417: feat: Add GDScript support (#72), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 07da6590aa 348/417: feat: Add LLVM MIR support, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 03644fb5fa 341/417: fix(indicators): Rely on range itself, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 6ec049b140 310/417: feat: Add Make support (#90), ELPA Syncer, 2024/07/01