From 073b77538fb948e4b3bdae5ad32d86fb536ce4e9 Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Sat, 28 Mar 2020 00:06:38 -0400 Subject: [PATCH] ADD comint-like evil bindings for haskell interactive mode --- etc/conf.org | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/etc/conf.org b/etc/conf.org index 66cd464..908a498 100644 --- a/etc/conf.org +++ b/etc/conf.org @@ -859,6 +859,8 @@ I have also found this to be much simpler and conflicting with other packages su (haskell-mode . company-mode) (haskell-mode . haskell-indentation-mode) ;; this enables better integration with the running GHCi process + ;; NOTE this is NOT the same is haskell-interactive-mode which is used + ;; in the repl that is launched within projects when loading files (haskell-mode . interactive-haskell-mode) (haskell-mode . nd/init-haskell-company) (haskell-mode . nd/haskell-load-maybe) @@ -3616,15 +3618,14 @@ REPL. If no SEND-INPUT-CMD then `comint-send-input' is used." ;; (add-hook 'evil-insert-state-entry-hook ;; 'nd/comint-char-mode-evil-insert nil t))) #+END_SRC -***** intero +***** haskell interactive mode +Not to be confused with =interactive-haskell-mode= which is part of the editing buffer #+BEGIN_SRC emacs-lisp -(evil-define-key 'normal intero-repl-mode-map - (kbd "RET") 'nd/comint-send-input-evil-insert) - -;; (add-hook 'intero-repl-mode-hook -;; (lambda () -;; (add-hook 'evil-insert-state-entry-hook -;; 'nd/comint-char-mode-evil-insert nil t))) +(evil-define-key '(normal insert) haskell-interactive-mode-map + (kbd "[[") #'haskell-interactive-mode-prompt-previous + (kbd "]]") #'haskell-interactive-mode-prompt-next + (kbd "C-k") #'haskell-interactive-mode-history-previous + (kbd "C-j") #'haskell-interactive-mode-history-next) #+END_SRC **** helm I like tab completion...regardless of what the helm zealots say.