Skip to content
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

Feature Request: use built-in tree-sitter for Emacs >= 29.0.60 #14

Open
Aaronzinhoo opened this issue Jan 2, 2023 · 12 comments
Open

Feature Request: use built-in tree-sitter for Emacs >= 29.0.60 #14

Aaronzinhoo opened this issue Jan 2, 2023 · 12 comments

Comments

@Aaronzinhoo
Copy link
Contributor

Now that tree-sitter is built in, it might be sufficient to include a way to utilize the built in tree-sitter functions instead of always requiring the tree-sitter & tree-sitter-langs external packages.

@Artawower
Copy link
Owner

If it's built into emacs, does that mean that as of version 29 you no longer need to require tree-sitter inside the package to work correctly?

If we are talking about readme and configuration file, then the manual installation part can be skipped.

@Aaronzinhoo
Copy link
Contributor Author

I think it's a little more complex than that. I was trying to double check the API for the built-in tree-sitter and believe the functions differ in names. So to support both versions there may need to be an update to the use of tree-sitter within the package.

@Artawower
Copy link
Owner

I will reflect about it but it won't be fast any way as I want to keep backwards compatibility with older versions of emacs. In this case, I need to implement logic to replace old functions at runtime.

I'm focused on another open source project right now to support org roam with web and mobile apps but I'll try to come back with this question in the future or maybe somebody will create pull request for this feature 😉

@Aaronzinhoo
Copy link
Contributor Author

Completely understandable! If I had any time I would definitely do a PR but that is a little too much for me to take on. Appreciate the package and your time @Artawower. Should I leave this open issue for now or close it?

@Artawower
Copy link
Owner

Thank you! Let it stay open

@chookity-pokk
Copy link
Contributor

Just to comment on this, I might try and implement the built in treesitter into this package over the next few days. I can open a PR so that people can see it easier, even if it doesn't end up being merged, if that works?

@Artawower
Copy link
Owner

Hi, I would be very grateful if you implement this! I am using the latest version of emacs with embedded treesit too, but unfortunately, I don't have time to implement it due to another open-source project. But I can review it and merge it.

Just one request, we need to keep backward compatibility :)

@emacsbliss
Copy link

I saw there is a PR open for this for a while, just curious what's the status for that PR? Thanks!

@Artawower
Copy link
Owner

Well, until I got my hands on implementing backwards compatibility, I've been focusing a bit on another open source project.

Anyway, I've been using this brunch lately, and it seems to work (at least on the same level as tree-sitter). So you can use it by specifying repo if you are elpaca/straight user.

I'll try to make time after the new year to implement backwards compatibility for older versions of emacs.

@emacsbliss
Copy link

totally understood and thanks a lot for making this for using built-in treesitter which what I'm mainly interested in.

I'll use this branch and try it out, thanks!!

@fapdash
Copy link

fapdash commented Dec 5, 2024

If you're already on Emacs 30 you can install the branch via use-package:

(use-package turbo-log
  :vc (:url "https://github.com/artawower/turbo-log.el"
            :branch "feat/treesit-migration"
            :rev "latest"))

Thanks for the work!

@Artawower
Copy link
Owner

After thinking a bit I decided to merge the current changes to support treesit into the main branch, while emacs < version 29 can use the alternate branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants