Open hongyi-zhao opened 3 years ago
Does it not make more sense to include these hooks to python-mode
in the use-package
forms for flycheck
and company
. That is:
(use-package company
:hook (python-mode . company-mode))
(use-package flycheck
:hook (python-mode . flycheck-mode))
However, I think you would be better served by hooking into prog-mode
rather than python-mode
.
(use-package company
:hook (prog-mode . company-mode))
(use-package flycheck
:hook (prog-mode . flycheck-mode))
@hongyi-zhao Your suggestion makes sense to me.
I install and manage the
python-mode
package viause-package
and have the following configuration in:hooks
section:If I combine the above two hook lines into this one:
(python-mode . (flycheck-mode company-mode))
, the following error will be triggered during Emacs startup:Error in post-command-hook (global-company-mode-check-buffers): (error "Lisp nesting exceeds ‘max-lisp-eval-depth’")
Why doesn't
use-package
support this type of hook combination?Regards, HZ