Closed ckruse closed 1 year ago
Does your Emacs crash? Sorry I didn't catch this, I didn't notice it since it's just silently getting printed to the *Messages*
buffer for me, but doesn't seem to be causing any unexpected behavior. I'm actually not sure how to make this go away, I'll need to spend some time looking into it
It's something strange to do with compilation, I believe. I see the same issue using the emacs-29
branch and also the master
branch of emacs on my macOS.
I think I fix it by adding
:build (:not autoloads)
and :build (:not compile))
to the straight.el
recipe.
So my config looks thus:
(use-package
treesit-auto
:straight
'(treesit-auto
:type git
:host github
:repo "renzmann/treesit-auto"
:build (:not autoloads)
:build (:not compile))
:demand t
:config
(setq treesit-auto-install 't)
(setq treesit-auto-opt-out-list '(protobuf))
(global-treesit-auto-mode)
(treesit-auto-install-all)
(setq python-ts-mode-hook python-mode-hook)
(setq yaml-ts-mode-hook yaml-mode-hook)
(setq json-ts-mode-hook json-mode-hook)
(setq markdown-ts-mode-hook markdown-mode-hook)
(setq bash-ts-mode-hook sh-mode-hook))
That makes it run without error (for me) but something else seems off, the symbol highlighting in python is still different than before, I believe.
I'm getting the same issue here!
I think I fix it by adding
:build (:not autoloads)
and:build (:not compile))
to thestraight.el
recipe.
I confirm that adding :build (:not autoloads)
to the recipe fixes the problem, thanks @jsigman !
~Same problem in Doom emacs. In this case, we cannot use the default system to add a package (package!
and use-package!
). If we use the code proposed here, treesit-auto
is installed correctly.~
EDIT: Actually no! I cannot use that proposed fix in Emacs 29 because the keyword :straight
is not recognized.
EDIT 2: Just forgot everything I wrote. To make this fix works in Doom emacs, add this configuration to packages.el
:
(package! treesit-auto
:recipe (:host github :repo "renzmann/treesit-auto"
:build (:not autoloads)
:build (:not compile)))
I guess just adding the autoload definitions isn't too offensive. If anyone else wants to check out #37, I'm going to pull that in in a little bit after a bit more testing on my end.
The new hotfix improves this for me. I can take out the special keywords and load the package now using master
-compiled emacs
Hi! In this new version, using Doom emacs, I see this error when loading emacs:
Symbol's value as variable is void: cl-struct-treesit-auto-recipe-tags
The autoload thing is causing more trouble than it's worth. This is such a small package that it probably makes sense to just avoid it entirely via #41. Would any of the the doom/straight users like to try that branch? I am simply using vanilla Emacs 29 for testing this and haven't run into the error @ronisbr is now facing
Hi @renzmann !
I can confirm that the branch in that PR do not lead to initialization problems in Doom emacs.
Hi there,
I just upgraded treesit-auto and now I get the following error:
Am I doing something wrong?
Best regards, CK