anoma / juvix-mode

The Juvix Emacs mode
https://github.com/anoma/juvix
GNU General Public License v3.0
1 stars 1 forks source link

Disabling Juvix Input mode causes a weird error with evil #20

Open mariari opened 6 days ago

mariari commented 6 days ago

This is rather minor as it does not cause any real harm, but if one disables juvix input mode and go to a new file, a stack trace like this shows up.

mariari commented 21 hours ago

I found out which part of the mode causes it

(define-derived-mode juvix-mode prog-mode (juvix-version)
  (font-lock-mode 0)
  (when juvix-auto-input-method
    (set-input-method "juvix"))
  (setq-local comment-start "--")

  (add-hook
   'juvix-mode-hook
   (lambda ()
     ;; (with-eval-after-load 'evil
     ;;   (evil-define-key 'normal juvix-mode-map (kbd "SPC m l") 'juvix-load)
     ;;   (evil-define-key 'normal juvix-mode-map (kbd "SPC m g") 'juvix-goto-definition)
     ;;   (evil-define-key 'normal juvix-mode-map (kbd "SPC m f") 'juvix-format-buffer)
     ;;   (evil-define-key 'normal juvix-mode-map (kbd "g d") 'juvix-goto-definition)
     ;;   (evil-normalize-keymaps)
     ;;   (add-hook 'post-command-hook #'juvix-posframe-at-pt)
     ;;   (juvix-insert-top-module-name)
     ;;   (juvix-load))
     )))

Commenting out this part fixes my issues