Added evil integration to haskell-mode
Overwrite the 'o' and 'O' normal mode commands to correctly indent new lines. Code was adapted from: https://github.com/haskell/haskell-mode/issues/1265
This commit is contained in:
parent
18301b0b9a
commit
18c50cbe1c
2 changed files with 21 additions and 0 deletions
|
@ -12,3 +12,20 @@
|
|||
(haskell-session-interactive-buffer (haskell-session))))))
|
||||
(window-buffer window)
|
||||
(error "Failed to display Haskell REPL")))
|
||||
|
||||
;;;###autoload
|
||||
(defun +haskell/evil-open-above
|
||||
"Opens a line above the current mode"
|
||||
(interactive)
|
||||
(evil-digit-argument-or-evil-beginning-of-line)
|
||||
(haskell-indentation-newline-and-indent)
|
||||
(evil-previous-line)
|
||||
(haskell-indentation-indent-line)
|
||||
(evil-append-line nil))
|
||||
|
||||
;;;###autoload
|
||||
(defun +haskell/evil-open-below ()
|
||||
"Opens a line below the current mode"
|
||||
(interactive)
|
||||
(evil-append-line nil)
|
||||
(haskell-indentation-newline-and-indent))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue