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
No support for rustic-mode #41
Comments
I'll add it in the next release. You can also customize (add-to-list 'tree-sitter-major-mode-language-alist '(rustic-mode . rust)) |
Okay, I added that to my emacs config, but now when I open a rust file, I am getting the below error:
what does this error mean? |
it means you need to install the rust grammar I think, but that is installed when you install this package, but I could be wrong |
Turns out I'm having this issue too:
to fix this run |
We dont need to do this. I suppose we have to run this only once to install all the grammars. I managed to get it work with |
@ubolonton Maybe it will be helpful if you could run You can document this in README section so that the users don't get confused. |
Please don't do this. If it was not run automatically, that's a bug to be fixed. |
Pleaes find below the steps to reproduce:
And you should run into the error: |
that's just a workaround
ibid. |
This is my conf. for emacs-tree-sitter:
I, too, use straight.el. Without the workaround this bug will show up. |
Normally you'd use
(use-package tree-sitter-langs
:straight (tree-sitter-langs :type git
:host github
:repo "ubolonton/emacs-tree-sitter"
:files ("langs/*.el" "langs/queries"))
:after tree-sitter) |
I tried this, but ran into the same error. I had to run |
Please provide better reproduction steps, which are not dependent on a specific config (the result of evaluating that depends on the specific straight.el setup; and in my case, it worked). For example, this is a minimal |
I realized why tree-sitter-langs was not being loaded. Since I used I put I will give you steps to reproduce a littler today after my day job completes. Thank you for your prompt replies |
Okay, I was able to fix the lazy loading issue by minor refactoring, I can confirm the below code works: (use-package tree-sitter
:if (executable-find "tree-sitter")
:straight (tree-sitter :type git
:host github
:repo "ubolonton/emacs-tree-sitter"
:files ("lisp/*.el" "src" "Cargo.toml" "Cargo.lock"))
:hook (((rustic-mode
python-mode
css-mode) . tree-sitter-mode)
((rustic-mode
python-mode
css-mode) . tree-sitter-hl-mode))
:config
(add-to-list 'tree-sitter-major-mode-language-alist
'(rustic-mode . rust)))
(use-package tree-sitter-langs
:if (executable-find "tree-sitter")
:straight (tree-sitter-langs :type git
:host github
:repo "ubolonton/emacs-tree-sitter"
:files ("langs/*.el" "langs/queries"))
:after tree-sitter) |
I use
rustic-mode
instead ofrust-mode
as the major mode for Rust files in emacs andemacs-tree-sitter
has no support for it :(Can you please add support for
rustic-mode
The text was updated successfully, but these errors were encountered: