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

Switch from CSTParser to something else (tree-sitter or JuliaSyntax) #149

Open
gcv opened this issue Mar 3, 2024 · 5 comments
Open

Switch from CSTParser to something else (tree-sitter or JuliaSyntax) #149

gcv opened this issue Mar 3, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@gcv
Copy link
Owner

gcv commented Mar 3, 2024

By switching to tree-sitter, built into Emacs as of version 29, all the questions Snail asks of CSTParser can be answered without leaving Elisp. This will be a significant benefit, not only by eliminating a dependency on CSTParser and its potentially unstable API, but also because Julia startup time will improve.

In general, it'll be great to ditch all Julia-side dependencies for core Snail functionality and leave them to extensions.

@gcv gcv added the enhancement New feature or request label Mar 3, 2024
@gcv gcv mentioned this issue Mar 3, 2024
@MasonProtter
Copy link
Contributor

MasonProtter commented Aug 7, 2024

By the way, JuliaSyntax.jl is now bundled inside of modern versions of Julia (since 1.9, and the new LTS is going to be v1.10), so you could also just use JuliaSyntax.jl instead of TreeSitter, but if there's other benefits to TreeSitter then I guess we should go with that.

@linwaytin
Copy link

I also feel JuliaSyntax.jl should be a better option than TreeSitter. The progress of tree-sitter-julia is slow, and I do not think it is supported officially from the Julia community.

@gcv gcv changed the title Switch to tree-sitter Switch from CSTParser to something else (tree-sitter or JuliaSyntax) Dec 11, 2024
@gcv
Copy link
Owner Author

gcv commented Dec 11, 2024

At this point, I’m also leaning in the direction of JuliaSyntax. I’m a little concerned about yanking the rug out from any users who need Julia versions <1.10, but it should be okay, as long as the docs point out that older versions of Snail can be installed using straight.el or Elpaca.

@linwaytin
Copy link

Also I think JuliaSyntax can be manually installed for version < 1.10, so it should not be a big problem to use this parser.

@MasonProtter
Copy link
Contributor

Yes, JuliaSyntax is compatible all the way back to julia v1.0 and is on the general registry.

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

No branches or pull requests

3 participants