-
Notifications
You must be signed in to change notification settings - Fork 55
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
[Request] Emacs 29 tree sitter mode #89
Comments
Same issue here, I install the following language grammar libraries: ;;
;; Configuration for downloading and installing
;; tree-sitter language grammars.
;;
(setq treesit-language-source-alist
'((c "https://github.com/tree-sitter/tree-sitter-c")
(cpp "https://github.com/tree-sitter/tree-sitter-cpp")
(zig "https://github.com/maxxnino/tree-sitter-zig")
)
;;
;; remap the non-treesitter mode to treesitter mode
;;
(setq major-mode-remap-alist
'((c-mode . c-ts-mode)
(cpp-mode . cpp-ts-mode)
(zig-mode . zig-ts-mode)
)
) Then I saw And run Also, I installed (use-package zig-mode
:hook (zig-mode . lsp-deferred)
:hook (zig-ts-mode . lsp-deferred)
) But when I open zig project, there is NO |
This was also something I was interested in. I took a stab at doing this in my fork on the On a high level, it refactors the current At its current state it only makes use of tree-sitter for syntax highlighting, but I plan to work on indentation next, and imenu integration after that. If this is an appropriate direction, I'd be happy to make a PR once I have tree-sitter based indentation working. |
I've got an initial version of tree-sitter based indentation working and I've created a PR for feedback and review. |
I tried using your branch with eglot/lsp-mode, but I can't seem to make it work with zig-ts-mode. |
With Emacs 29.1 being released, Tree Sitter support is now natively in Emacs. However, to use it there needs to be a dedicated major mode extending the base mode. In this case there would need to be a zig-ts-mode. Would that be possible?
The text was updated successfully, but these errors were encountered: