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

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

[nongnu] elpa/treesit-fold 9be3f5b086 034/417: Update readme


From: ELPA Syncer
Subject: [nongnu] elpa/treesit-fold 9be3f5b086 034/417: Update readme
Date: Mon, 1 Jul 2024 10:02:08 -0400 (EDT)

branch: elpa/treesit-fold
commit 9be3f5b08637956336d1f1155eae30a2774fe904
Author: JenChieh <jcs090218@gmail.com>
Commit: JenChieh <jcs090218@gmail.com>

    Update readme
---
 README.md | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/README.md b/README.md
index dcdd55d86c..7dd8be3886 100644
--- a/README.md
+++ b/README.md
@@ -2,3 +2,39 @@
 
[![CI](https://github.com/jcs090218/tree-sitter-fold/actions/workflows/test.yml/badge.svg)](https://github.com/jcs090218/tree-sitter-fold/actions/workflows/test.yml)
 
 # tree-sitter-fold
+> Code-folding using tree-sitter
+
+tree-sitter-fold builds on top of 
[elisp-tree-sitter](https://github.com/emacs-tree-sitter/elisp-tree-sitter)
+to provide code folding base on the tree-sitter syntax tree.
+
+## Installation
+
+#### Methods 1. with `straight.el` and `use-package`:
+
+```el
+(use-package tree-sitter-fold
+  :straight (host github repo "junyi-hou/tree-sitter-fold"))
+```
+
+#### Methods 2. Manual
+
+```sh
+git clone https://github.com/jcs090218/tree-sitter-fold /path/to/lib
+```
+
+then in Emacs:
+
+```el
+(add-to-list 'load-path "/path/to/lib")
+(require 'tree-sitter-fold)
+```
+
+## Usage
+
+ | Commands                            | Description                           
                                      |
+ 
|-------------------------------------|-----------------------------------------------------------------------------|
+ | `tree-sitter-fold-close`            | fold the current syntax node.         
                                      |
+ | `tree-sitter-fold-open`             | open all folds inside the current 
syntax node.                              |
+ | `tree-sitter-fold-open-recursively` | open the outmost fold of the current 
syntax node. Keep the sub-folds close. |
+ | `tree-sitter-fold-close-all`        | close all foldable syntax nodes in 
the current buffer.                      |
+ | `tree-sitter-fold-open-all`         | open all folded syntax nodes in the 
current buffer.                         |



reply via email to

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