branch: elpa/treesit-fold
commit 9be3f5b08637956336d1f1155eae30a2774fe904
Author: JenChieh <[email protected]>
Commit: JenChieh <[email protected]>
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 @@
[](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. |