evil-collection icon indicating copy to clipboard operation
evil-collection copied to clipboard

Failed to define function python-ts-mode

Open Gako358 opened this issue 11 months ago • 7 comments
trafficstars

Getting an error when using evil-collection with python:

File mode specification error: (error Autoloading file /nix/store/4dxx3kdl76zqf6a42flvf3wi89sfj927-emacs-packages-deps/share/emacs/site-lisp/elpa/evil-collection-20241011.2043/modes/python/evil-collection-python.elc failed to define function python-ts-mode)

If I turn off collection, it works, and with all other LSP, I got no problem. Is this a known issue?

My config:

  (use-package treesit
    :ensure nil
    :custom
    (treesit-font-lock-level 4)
    :config
    (seq-do (lambda (it)
              (push it major-mode-remap-alist))
              '((javascript-mode . js-ts-mode)
              (python-mode . python-ts-mode)
              (typescript-mode . typescript-ts-mode)
              (java-mode . java-ts-mode)
              (css-mode . css-ts-mode)
              (sh-mode . bash-ts-mode)
              (scala-mode . scala-ts-mode)
              (nix-mode . nix-ts-mode)
              (shell-script-mode . bash-ts-mode))))

  (use-package eglot-booster
    :after eglot
    :config	(eglot-booster-mode))

  (with-eval-after-load 'eglot
    (add-to-list 'eglot-server-programs
                 '(scala-ts-mode . ("metals"))))

  (use-package scala-ts-mode
    :init
    (setq scala-ts-indent-offset 2))

  (use-package haskell-mode)
  (use-package markdown-mode)
  (use-package nix-ts-mode
    :mode "\\.nix\\'"
    :hook (nix-ts-mode . eglot-ensure))

  (use-package python
    :after eglot
    :hook (python-ts-mode . eglot-ensure)
    :mode "\\.py\\'")

Gako358 avatar Dec 17 '24 10:12 Gako358