-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more nodes to elisp parser, remove s
dependency, add vimscript
#6
Add more nodes to elisp parser, remove s
dependency, add vimscript
#6
Conversation
946be82
to
6774734
Compare
This commit includes some new features and changes: * Add more nodes/rule set to elisp parser. This add support for folding lists and special forms such as `if`, `defvar` and etc. * Remove dependency in `s.el` library. There was only 1 function from s.el in use, it was replaced by its built-in alternative. * Add vimscript support through vimscript-ts-mode. It only add folding for `functions` and `if` conditionals. * Add more missing `*-ts-modes` to `treesit-fold-range-alist` list. This also rmeove some modes that doesn't exists or unlikely to exist.
6774734
to
33a41b2
Compare
treesit-fold.el
Outdated
@@ -63,6 +62,7 @@ | |||
(agda-mode . ,(treesit-fold-parsers-agda)) | |||
(arduino-mode . ,(treesit-fold-parsers-arduino)) | |||
(asm-mode . ,(treesit-fold-parsers-asm)) | |||
(awk-mode . ,(treesit-fold-parsers-c)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we create a specific parser function for Awk? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as far as i know awk uses some of c syntax, such as if
, switch
, for
and while
.
so i don't think it should be necessary (for now)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to wrap it like this: 🤔
(defun treesit-fold-parsers-awk ()
"Rule set for Awk."
(append (treesit-fold-parsers-c)))
And tree-sitter-awk doesn't seem to build on top of the tree-sitter-c. Maybe add a comment ;; TODO:
besides it. 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to wrap it like this: 🤔
(defun treesit-fold-parsers-awk () "Rule set for Awk." (append (treesit-fold-parsers-c)))And tree-sitter-awk doesn't seem to build on top of the tree-sitter-c. Maybe add a comment
;; TODO:
besides it. 🤔
Done.
LGTM! I appreciate your cooperation! |
Thank you, also i would like to know if there are plans for submit this package to nonGNU ELPA. |
I never submitted a package to nonGNU ELPA since I already have my own ELPA, JCS-ELPA. Anyone can submit this package to non-GNU ELPA if they want to. :) |
Glad to know, i've open a PR that is the last step to allow submiting it to NonGNU. |
Feel free to do so! |
This commit includes some new features and changes:
if
,defvar
and etc.s.el
library. There was only 1 function from s.el in use, i replaced it by its built-in alternative.functions
andif
conditionals.*-ts-modes
totreesit-fold-range-alist
list. This also remove some modes that doesn't exists or unlikely to exist.