Standardize REPL commands & improve SPC o r
- SPC o r now prompts for a REPL to open when none was found for the current buffer. - REPL handlers must now follow the naming convention "*/open*-repl". e.g. +python/open-ipython-repl, +emacs-lisp/open-repl, etc. - +eval/open-repl has been split in two: - +eval/open-repl-other-window - +eval/open-repl-same-window
This commit is contained in:
parent
4437d80133
commit
94b16cba6c
19 changed files with 83 additions and 52 deletions
|
@ -1,14 +1,10 @@
|
|||
;;; lang/haskell/autoload.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;;###autoload
|
||||
(defun +haskell-repl-buffer (&optional arg)
|
||||
"Returns the appropriate Haskell REPL buffer."
|
||||
(if (featurep! +intero)
|
||||
(intero-repl-buffer arg)
|
||||
(haskell-session-interactive-buffer (haskell-session))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +haskell/repl (&optional arg)
|
||||
(defun +haskell/open-repl (&optional arg)
|
||||
"Opens a Haskell REPL."
|
||||
(interactive "P")
|
||||
(display-buffer (+haskell-repl-buffer arg)))
|
||||
(display-buffer
|
||||
(if (featurep! +intero)
|
||||
(intero-repl-buffer arg)
|
||||
(haskell-session-interactive-buffer (haskell-session)))))
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
interactive-haskell-mode))
|
||||
(set-lookup-handlers! 'haskell-mode :definition #'haskell-mode-jump-to-def-or-tag)
|
||||
(set-file-template! 'haskell-mode :trigger #'haskell-auto-insert-module-template :project t)
|
||||
(set-repl-handler! '(haskell-mode haskell-cabal-mode literate-haskell-mode) #'+haskell-repl-buffer)
|
||||
(set-repl-handler! '(haskell-mode haskell-cabal-mode literate-haskell-mode) #'+haskell/open-repl)
|
||||
|
||||
(add-to-list 'completion-ignored-extensions ".hi")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue