[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/treesit-fold 6b759ca36e 402/417: Update README.org (#4)
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/treesit-fold 6b759ca36e 402/417: Update README.org (#4) |
Date: |
Mon, 1 Jul 2024 10:03:10 -0400 (EDT) |
branch: elpa/treesit-fold
commit 6b759ca36ef78730b8768f407e438bd045a6c074
Author: DevelopmentCool2449
<163072436+DevelopmentCool2449@users.noreply.github.com>
Commit: GitHub <noreply@github.com>
Update README.org (#4)
---
README.md | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/README.md b/README.md
index 1bc4ab5bc8..3049ee448e 100644
--- a/README.md
+++ b/README.md
@@ -26,7 +26,7 @@ the tree-sitter syntax tree.
- [🖥 Usage](#🖥-usage)
- [📇 Commands](#📇-commands)
- [🔨 Supported languages](#🔨-supported-languages)
- - [Add support for non-ts modes](#-Add support for non-ts modes)
+ - [🚀 Add support for non-ts modes](#🚀-Add support for non-ts modes)
- [📝 Customization](#📝-customization)
- [⚪ Folding on new nodes](#⚪-folding-on-new-nodes)
- [❔ Example](#❔-example)
@@ -149,7 +149,7 @@ These languages are in development:
*P.S. We don't list trivial languages here. e.g., LLVM IR (`.ll`) files, etc.
Please see the variable `treesit-fold-range-alist` for the fully supported
list!*
-#### Add support for non-ts modes
+#### 🚀 Add support for non-ts modes
You can add folding support for non-ts modes (such as c-mode or
emacs-lisp-mode),
this requires you have the parser library for the mode.
After, you can enable folding adding these code snippets to your configuration:
@@ -405,8 +405,8 @@ basic `treesit-fold-range-seq`.
```elisp
(defun treesit-fold-range-seq (node offset)
"..."
- (let ((beg (1+ (tsc-node-start-position node))) ; node beginning position
- (end (1- (tsc-node-end-position node)))) ; node end position
+ (let ((beg (1+ (treesit-node-start node))) ; node beginning position
+ (end (1- (treesit-node-end node)))) ; node end position
(treesit-fold--cons-add (cons beg end) offset))) ; return fold range
```
@@ -653,11 +653,12 @@ To look for the correct node you have three options:
- look at the `tree-sitter-[lang]/grammar.js` implementation. In the above
example, `block` node is defined in the
[tree-sitter-c-sharp](https://github.com/tree-sitter/tree-sitter-c-sharp)'s
- `grammar.js` file
-- open a file of your language choice in emacs and `M-x
tree-sitter-debug-mode`.
- This will display the whole s-expr representing your file
-- `(message "%S" (tsc-node-to-sexp))` in your function to display what your
- function is seeing
+ `grammar.js` file.
+- open a file of your language choice (ensure that it has a tree-sitter
parser) in emacs and `M-x treesit-explore-mode`.
+ This will display a buffer with the whole s-expr representing nodes at point
from the current file/buffer.
+- `M-x treesit-inspect-node-at-point` in your function to display what your
+ function is seeing.
+- Also you can use `M-x treesit-inspect-mode` which diplay in the mode-line
the current node at point.
> ⚠️ Warning
>
- [nongnu] elpa/treesit-fold d20c3663f9 380/417: Update desc, (continued)
- [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
- [nongnu] elpa/treesit-fold 75e72c658a 332/417: feat: Add Org support, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 9b25eeeb0b 404/417: chore: Update mouse face docstring, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 6b759ca36e 402/417: Update README.org (#4),
ELPA Syncer <=
- [nongnu] elpa/treesit-fold a9d4c2ec53 296/417: feat: Add XML support (#80), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 5c45efb2d5 316/417: Update CHANGELOG.md, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold abb1c53bd4 336/417: Bump version for next release, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 544390c602 329/417: fix: Fold line comment with same indentation, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 7fdaf447cc 245/417: Change global mode to turn on with tree-sitter (#41), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 07fe2d17f4 249/417: feature: Add minor-mode for line comment (#45), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 458903e88d 250/417: fix: Fix nil tree-sitter-node, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 6ada31e372 251/417: changelog, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold fbb5510d5c 290/417: feat: Add LaTex support (#76), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 81dc9eff92 283/417: Update CHANGELOG.md, ELPA Syncer, 2024/07/01