Closed mattiasdrp closed 2 years ago
I was having this issue too, and then I found in my config that I had hs-minor-mode
in my prog-mode-hook
. If you check major-mode
in the tree-sitter-query-builder
buffer, you'll see that it's actually tree-sitter-query-mode
, so you need to disable hs-minor-mode
in that, not in tree-sitter-mode
proper. However, I also tried adding a hook to tree-sitter-query-mode
to turn it off, and it's already too late, so you will have to disable hideshow before running tree-sitter-query-builder
.
I also couldn't find the source of this error in the tree-sitter
code, so I checked hideshow.el, and that is where the issue originates, not in this package.
Sorry for the delay! Thanks, that actually fixed my issue :-)
I also couldn't find the source of this error in the tree-sitter code, so I checked hideshow.el, and that is where the issue originates, not in this package.
what the issues hideshow
package has? This should be fixed in upstream.
currently workaround:
(use-package hideshow
:hook (prog-mode . (lambda ()
(unless (eq major-mode 'tree-sitter-query-mode)
(hs-minor-mode)))))
For some reason hs-grok-mode-type
throws an error after determining that the mode doesn't support hideshow mode. I didn't originally think of this as an actual issue in hideshow, just an incompatibility. But looking at it again, it doesn't really make sense why they signal an error instead of just disabling hideshow (as they already do) and printing a warning or something. I'm not really using either of these packages anymore, but that should give you somewhere to start if you want to report/fix this upstream.
I think hideshow is part of emacs itself, so this is probably a time for M-x report-emacs-bug.
Whenever I
M-x tree-sitter-query-builder
I have the following error:I tried adding a hook:
But the error remains