-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
Rewrite using tree-sitter #428
Comments
Hey @dominikh 👋 thank you for the amazing work. |
@fedeizzo I am working on it, yes. In part I am waiting on the next release of Emacs, as the current one has some unfortunate bugs. |
is there a way we can help? if you have some plan to rewrite the parts and it could be done independently maybe we can help |
Thank you for the offer, but no. |
I have started on a tree-sitter-based rewrite of go-mode. The plan going forward is to tag a final release of the existing go-mode, then replace it with the tree-sitter-based one and require Emacs 29 + tree-sitter for all future versions.
The tree-sitter version, aside from being much simpler, will also fix various bugs involving indentation and navigation, especially involving generics. Syntax highlighting will likely get a fair bit more powerful, too.
I have decided against maintaining both the old and new version as separate modes. Using a proper (and fast) parser is the way forward. The current implementation of syntax highlighting, indentation and navigation is based on a hacky collection of regular expressions. The code is barely maintainable, doesn't handle several corner-cases correctly, and we haven't managed to update it to support generics reliably for years. We clearly don't have the manpower or interest to keep working on the existing code base. Instead of keeping an unmaintained copy of the old version around, make it very clear that we will only work on the tree-sitter version going forward.
This also means that the tree-sitter-based mode will not be getting its own name; it will continue to be called go-mode. There will be two tree-sitter-based modes: our go-mode, and the buggy, low-effort go-ts-mode that comes bundled with Emacs.
The text was updated successfully, but these errors were encountered: