mickeynp / combobulate

Structured Editing and Navigation in Emacs with Tree-Sitter
GNU General Public License v3.0
920 stars 53 forks source link

`void-function combobulate-highlight-install` when enabling combobulate #118

Open offbyone opened 1 week ago

offbyone commented 1 week ago

I am using doom emacs, with combobulate installed:

(package! combobulate :recipe (:type git :host github :repo "mickeynp/combobulate"))

and set up:

(use-package! combobulate
  :after treesit
  ;;:custom
  ;;(combobulate-key-prefix "C-c o")
  :hook ((prog-mode . combobulate-mode)))

;; enable python
(use-package! combobulate-python)

When I open a tree-sitter Python mode, combobulate blows up with a void-function combobulate-highlight-install:

Debugger entered--Lisp error: (void-function combobulate-highlight-install)
  combobulate-highlight-install(python)
  combobulate-setup()
  (let ((last-message (current-message))) (setq combobulate-python-minor-mode (cond ((eq arg 'toggle) (not combobulate-python-minor-mode)) ((and (numberp arg) (< arg 1)) nil) (t t))) (if (boundp 'local-minor-modes) (progn (setq local-minor-modes (delq 'combobulate-python-minor-mode local-minor-modes)) (if combobulate-python-minor-mode (progn (setq local-minor-modes (cons 'combobulate-python-minor-mode local-minor-modes)))))) (combobulate-setup) (combobulate-python-setup 'python) (run-hooks 'combobulate-python-minor-mode-hook (if combobulate-python-minor-mode 'combobulate-python-minor-mode-on-hook 'combobulate-python-minor-mode-off-hook)) (if (called-interactively-p 'any) (progn nil (if (and (current-message) (not (equal last-message (current-message)))) nil (let ((local " in current buffer")) (message "%s %sabled%s" "Combobulate-Python minor mode" (if combobulate-python-minor-mode "en" "dis") local))))))
  combobulate-python-minor-mode(1)
  combobulate-maybe-activate(nil nil)
  combobulate-mode()
  run-hooks(change-major-mode-after-body-hook prog-mode-hook python-base-mode-hook python-mode-hook)
  apply(run-hooks (change-major-mode-after-body-hook prog-mode-hook python-base-mode-hook python-mode-hook))
  run-mode-hooks(python-mode-hook)
  python-mode()

I have tried adding (use-package! combobulate-query) to my config, but that just pushed off to a new undefined function:

Debugger entered--Lisp error: (void-function combobulate-define-envelope)
  combobulate-define-envelope(:description "( ... )" :key "(" :extra-key "M-(" :mark-node t :split-node t :shorthand wrap-expressions :name "wrap-parentheses" :template (@ "(" r ")"))
  combobulate-setup()

I don't think I'm supposed to be playing use-package whack-a-mole here, so I think I'm missing something in the setup of combobulate. I'm not sure what. I see that there is a load-path setting in the example setup you have in README.rst but I believe -- and I'm happy to be corrected if I'm wrong -- that Doom's setup already gives me that load path.

mickeynp commented 1 week ago

Does it work with emacs -q and the prescrived configuration?

offbyone commented 1 week ago

I legit don't know if I could strip down the doom configuration enough to make that a meaningful comparison. By the time I use -q then all of the code that loads this and its other dependencies would be gone, including the use-package! macro that's wrapping use-package; I literally can't run these snippets without doom's code too.

's okay, I understand that you're not gonna want to walk through every permutation of .emacs out there. Hopefully someone else who uses Doom's distro will see this and have an answer, or at least save themselves some confusion when they run into it.

mickeynp commented 6 days ago

I want to understand if works fine in a clean Emacs without any customisation. If it does not, then there's something funky going on w/ combobulate.

Can you not just use the official installation instructions in your config? That would surely work?