-
-
Notifications
You must be signed in to change notification settings - Fork 11
treesit.el Support #3
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
treesit.el Support #3
Conversation
Can you solve the compile warnings? Thanks!
Can you also update the Eask-file? Thank you! |
9706799
to
adabe22
Compare
Done. About the docstring warning i'm not sure why it happens, i think it can be a false-positive. |
adabe22
to
31568a4
Compare
As an aditional note i'm wondering if we can add a section in the README file for how allow folding non-ts modes by using their parsers, it's based in a @abougouffa comment, i've tested it for elisp evaling this code snippet and folding works well. (when (and (treesit-available-p) (treesit-language-available-p 'elisp))
(treesit-parser-create 'elisp)) or add an option for allow that. |
31568a4
to
6b01736
Compare
I agreed. Let's add it to the README! :D |
6b01736
to
03d0d4d
Compare
Done |
LGTM! Thank you so much! :D |
Excellent work @DevelopmentCool2449 ! |
This adds real treesit.el support, also i've added a feature for unfold by clicking fold-replacement.
Some changes to consider:
-ts-mode
modes totreesit-fold-range-alist
There are some modes that still need to add such as
vimscript-ts-mode
and morethat i think it can be added in separated PR.
treesit-fold-2str
treesit-fold-get-children
andtreesit-fold-get-children-traverse
were replaced or removed (treesit-fold-get-children-traverse
was unused so i commented out it).tsc-*
functions were replaced by theirtreesit
counterpart.I've tested it with lua, c/c++ and python and should work for the other languages.
Also i've added some temporal comments for review.