[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/treesit-fold 8a5c66d099 110/417: Add support for PHP
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/treesit-fold 8a5c66d099 110/417: Add support for PHP |
Date: |
Mon, 1 Jul 2024 10:02:16 -0400 (EDT) |
branch: elpa/treesit-fold
commit 8a5c66d09947cd3ce3586afc2a8aa9ebcdeca89c
Author: Jen-Chieh Shen <jcs090218@gmail.com>
Commit: Jen-Chieh Shen <jcs090218@gmail.com>
Add support for PHP
---
README.md | 2 +-
tree-sitter-fold-parsers.el | 9 +++++++++
tree-sitter-fold.el | 1 +
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index e349756d85..d4210ea1f2 100644
--- a/README.md
+++ b/README.md
@@ -50,7 +50,7 @@ then in Emacs:
* HTML
* Java / JavaScript / JSX / JSON
* Nix
-* Python
+* PHP / Python
* R / Ruby / Rust
* Scala / Swift
* TypeScript / TSX
diff --git a/tree-sitter-fold-parsers.el b/tree-sitter-fold-parsers.el
index 963ceb8b3c..56240d664c 100644
--- a/tree-sitter-fold-parsers.el
+++ b/tree-sitter-fold-parsers.el
@@ -124,6 +124,15 @@
(interpolation . tree-sitter-fold-range-seq)
(list . tree-sitter-fold-range-seq)))
+(defun tree-sitter-fold-parsers-php ()
+ "Rule sets for PHP."
+ '((namespace_use_group . tree-sitter-fold-range-seq)
+ (declaration_list . tree-sitter-fold-range-seq)
+ (use_list . tree-sitter-fold-range-seq)
+ (switch_block . tree-sitter-fold-range-seq)
+ (compound_statement . tree-sitter-fold-range-seq)
+ (comment . tree-sitter-fold-c-like-comment)))
+
(defun tree-sitter-fold-parsers-python ()
"Rule sets for Python."
'((function_definition . tree-sitter-fold-range-python)
diff --git a/tree-sitter-fold.el b/tree-sitter-fold.el
index 3d461218c7..14667df6b8 100644
--- a/tree-sitter-fold.el
+++ b/tree-sitter-fold.el
@@ -80,6 +80,7 @@ The alist is in form of (major-mode . (foldable-node-type)).")
(json-mode . ,(tree-sitter-fold-parsers-json))
(jsonc-mode . ,(tree-sitter-fold-parsers-json))
(nix-mode . ,(tree-sitter-fold-parsers-nix))
+ (php-mode . ,(tree-sitter-fold-parsers-php))
(python-mode . ,(tree-sitter-fold-parsers-python))
(rjsx-mode . ,(tree-sitter-fold-parsers-javascript))
(ruby-mode . ,(tree-sitter-fold-parsers-ruby))
- [nongnu] elpa/treesit-fold a68579c4f7 098/417: Fix ind overlays, (continued)
- [nongnu] elpa/treesit-fold a68579c4f7 098/417: Fix ind overlays, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 66a8b272cc 101/417: Fix docstring extract condition, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 1602759fdd 178/417: Rename util module without util prefix, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold b505f0719f 183/417: ci: No more platform specific, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold e9d26a8e18 186/417: Update Eask, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 4e59c763c4 187/417: ci: cancel last workflow on push, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 62667ad992 189/417: Update README.md, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold d6fbca3748 168/417: Update changelog, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 9fdf72dc20 201/417: docs(README): order contribute section, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 4a2996eb5e 109/417: Organize, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 8a5c66d099 110/417: Add support for PHP,
ELPA Syncer <=
- [nongnu] elpa/treesit-fold 0fe507ba03 111/417: Support sharp blocks, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 91fdf441bf 366/417: chore: Update copyright year, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold cad8607df0 107/417: Organize parsers, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 1e19f7c159 113/417: Fix compile warnings, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 9a7b17aec8 208/417: update, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold d8d6fc0558 209/417: update, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold bada0924b6 149/417: Support ruby, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold a137933c2b 153/417: Add screneshot, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold d7af314083 160/417: Done html, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold e286098005 164/417: Support css comment, ELPA Syncer, 2024/07/01