-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Use Emacs 29 built-in Tree-Sitter Support #12
Comments
So how do I get this tree-sitter requirement to work with Emacs 28.1? I followed the README which talks about tree-sitter as a requirement… |
@etnt I'm having the same problem with Emacs 30, but I think this should be in a separate issue. |
Emacs 29 ships With an extra effort, it would be possible for this mode to provide the two versions simultaneously, but it is such a burden to the maintainers. I would propose forking this repository to create a new |
I couldn't have said it better myself 😁 Though if the immensity of elixir-ts-mode is anything to go by, it'll be a while before a |
Well, for the Elixir mode, some 200 lines are just faces and constant definitions and some 150 are almost copy pasted from the upstream The rest seems quite complex, though... I guess the only way to check how hard it is would be to try to implement it 😝 |
@akirak upstream, some modes were split between a base package, the original regex-based syntax/indentation and the new tree sitter package. For example, you have
|
Separating out common functionalities would be nice. The situation is not exactly the same, though. The three Python-related modes are all part of It's just about packaging, so there is not much to worry about. |
Right. I wasn't sure if (and don't think) MELPA would allow git submodules, so I was waiting for a better solution before pushing to MELPA. |
@akirak Oh right! I forgot about the dependencies, specially as @J3RN It seems the sub-module is required for the highlight queries and the tree sitter grammar. For the first one, the queries are usually placed inside the source file, and for the second one, you could copy what But I think you could do both things with the current implementation as well. Just move the |
Is the package supposed to work on emacs 29? I'm trying and get the
I thought maybe it was supposed to use the submodule and work on 29+? |
Just checking in to see if anyone has any better idea of when this package will work on emacs 29? Looking forward to learning this language, would really love it if it worked on my daily editor |
Hello, friends. I've started work on a |
sorry if this is a really basic question, but can you walk me through giving this a spin? I put in |
A few things:
|
I'm generally out of my depth here (new to Gleam, not fluent in elisp whatsoever), but I'm pretty sure |
@J3RN Thank you so much! The new branch works perfectly. For lurkers, in order to get LSP working I had to modify this file on my local machine and add (load! "gleam-ts-mode.el") ; just copy-pasted
(add-to-list 'auto-mode-alist '("\\.gleam$" . gleam-ts-mode))
(add-to-list 'lsp-language-id-configuration '(gleam-ts-mode . "gleam"))
(add-hook 'gleam-ts-mode-hook #'lsp!) Once you're comfortable merging this branch, I'll submit this patch to lsp-mode:) Thanks again! |
@it-is-wednesday doom uses (package! gleam-ts-mode
:recipe (:type git
:host github
:repo "gleam-lang/gleam-mode"
:branch "gleam-ts-mode"
:files ("gleam-ts-mode.el"))) After next My other config is pretty simple too: (use-package! gleam-ts-mode
:commands gleam-ts-mode
:bind (:map gleam-ts-mode-map
("C-c g f" . gleam-format))
:init
(add-to-list 'auto-mode-alist '("\\.gleam$" . gleam-ts-mode))
:config
(add-hook 'gleam-ts-mode-hook #'eglot-ensure 'append)) With 1.0.0 release, perhaps it will be better to publish |
I have just updated the |
I just merged the |
Aside: This is most likely going to just be a note to myself.
Emacs 29 introduces first-party support for tree-sitter, so we'd no longer have to rely on a third-party package to provide syntax highlighting. We should transition to this new system when possible.
The text was updated successfully, but these errors were encountered: