-
Notifications
You must be signed in to change notification settings - Fork 31
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
treesit-auto appears to be setting the mode of non-python files to python-mode
#26
Comments
What a wild bug! Before I get a chance to dig in, I see a few things we can try to narrow down the bug space. First, when the bug is present, what's the value of major-mode-remap-alist? What we want to know is if it has Then, with the treesit-auto config commented out, use
If none of these reproduce the bug, I'll need to look more carefully, or get a minimum preproduction based on emacs -q |
Sorry for the delay (and the fat fingers send - will edit the comment with details), had to keep my config stable for a few days. Right, testing against:
I get: Debugger entered--Lisp error: (wrong-type-argument treesit-auto-recipe nil)
treesit-auto--ready-p(markdown-mode)
treesit-auto--maybe-install-grammar()
eval-expression((treesit-auto--maybe-install-grammar) nil nil 127)
funcall-interactively(eval-expression (treesit-auto--maybe-install-grammar) nil nil 127)
command-execute(eval-expression)
Tried both ways of setting the python modes (on top of the above failure to install the grammar), but the markdown file still opens with
|
I've upgraded emacs to current latest ( Going to close it off. Thanks for the help and sorry for pointing the finger of blame in your direction :) |
I've upgraded emacs to current latest (`GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.36, cairo version 1.17.6) of 2023-02-10`) and that appears to have fixed this issue with the same version of `treesit-auto` + my current config. Issue: renzmann/treesit-auto#26.
I'm still trying to dig into this with my messy config (https://github.com/jackson15j/dot_emacs), but I think there may be some interaction with
treesit-auto
,lsp
,projectile
that is changing the mode of non-python files to be set topython-mode
.The
auto-mode-alist
looks sane with no mixing ofpython-mode
to non-python files.Reproduction:
.emacs
&config.org
to home directory from: https://github.com/jackson15j/dot_emacs/tree/057d0b44cf31ac6351f48674d9228fa642935831rm -rf ~/.emacs.d
.emacs
.pyright
). Note: it is opened withpython-mode
.python-mode
instead ofmarkdown-mode
.Sorry for the rough reproduction steps. Happy to dig more if you can give me some advice.
Locally, I've commented out
treesit-auto
and nuked my~/.emacs.d
folder and now back to non-python files opening in the correct mode.The text was updated successfully, but these errors were encountered: