[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/treesit-fold 809bc9a0db 090/417: Remove go decalaration
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/treesit-fold 809bc9a0db 090/417: Remove go decalaration |
Date: |
Mon, 1 Jul 2024 10:02:14 -0400 (EDT) |
branch: elpa/treesit-fold
commit 809bc9a0db75dff5df39156ad6839575a6b6a348
Author: Jen-Chieh Shen <jcs090218@gmail.com>
Commit: Jen-Chieh Shen <jcs090218@gmail.com>
Remove go decalaration
---
tree-sitter-fold.el | 29 -----------------------------
1 file changed, 29 deletions(-)
diff --git a/tree-sitter-fold.el b/tree-sitter-fold.el
index 7fe2d368ca..ddd5bffd1f 100644
--- a/tree-sitter-fold.el
+++ b/tree-sitter-fold.el
@@ -338,35 +338,6 @@ If the current syntax node is not foldable, do nothing."
(tree-sitter-fold-range-seq node (cons 1 -1))
nil))
-(defun tree-sitter-fold-range-go-type-declaration (node offset)
- "Return the fold range for `type_declaration' NODE.
-Only `struct_type' and `interface_type' nodes can be folded."
- (when-let* ((type-spec-node (tsc-get-nth-child node 1))
- ;; the type_spec node is not named in the Go grammar
- ;; so ensure that the 1-th child is a type_spec node
- ((eq (tsc-node-type type-spec-node) 'type_spec))
- (type-node (tsc-get-child-by-field type-spec-node :type))
- (type-node-type (tsc-node-type type-node)))
- (cond
- ;; only struct and interface types can be folded
- ((or (eq type-node-type 'struct_type)
- (eq type-node-type 'interface_type))
- ;; find the end of the "struct" or "interface" keyword
- (let ((beg (1+ (tsc-node-end-position (tsc-get-nth-child type-node 0))))
- (end (tsc-node-end-position node)))
- (setq beg (+ beg (car offset)) end (+ end (cdr offset)))
- (cons beg end)))
- (t nil))))
-
-(defun tree-sitter-fold-range-go-method (node offset)
- "Return the fold range for `method_declaration' NODE."
- (let* ((named-node (or (tsc-get-child-by-field node :result)
- (tsc-get-child-by-field node :parameters)))
- (beg (1+ (tsc-node-end-position named-node)))
- (end (tsc-node-end-position node)))
- (setq beg (+ beg (car offset)) end (+ end (cdr offset)))
- (cons beg end)))
-
(defun tree-sitter-fold-range-nix-function (node offset)
"Return the fold range for `function' NODE."
(let ((beg (thread-first node
- [nongnu] elpa/treesit-fold 17d029c8bd 064/417: Update Cask, (continued)
- [nongnu] elpa/treesit-fold 17d029c8bd 064/417: Update Cask, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 7a2cbb3c80 066/417: Add changelog, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold e38981daf7 070/417: Enalbe compile, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold dc670a048b 072/417: Add readme, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold a5d413e45c 074/417: Complete Java, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold de128eaf10 076/417: Add CSS, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 23bd9c2c05 077/417: Add CSS, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold fef90261f5 082/417: Apply offset, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 76e0dd263e 088/417: Hide indicators when single line, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 8fc88e29f5 089/417: Login update for Csharp comment, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 809bc9a0db 090/417: Remove go decalaration,
ELPA Syncer <=
- [nongnu] elpa/treesit-fold 422cff043e 100/417: Fix comment line, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 2d2179292f 105/417: Fix doc string, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 5062bf22a8 112/417: Mark temp, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 959191660b 115/417: Simplify, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 7065c6b28f 122/417: Apply macro, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold f49df1ea3d 124/417: Update doc, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 6f15c1735a 125/417: Support javascript comment, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold eeb9c03bcc 127/417: Fix conitouse line, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold c33e5e7e0c 128/417: Temporily disable csharp, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 6b6f30eb4a 142/417: Add emoji, ELPA Syncer, 2024/07/01