mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
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:
@ -8,15 +8,15 @@ This module adds support for shell scripting languages.
|
||||
+ REPL support
|
||||
|
||||
* Table of Contents :TOC:
|
||||
- [[#install][Install]]
|
||||
- [[#appendix][Appendix]]
|
||||
- [[#commands][Commands]]
|
||||
- [[Install][Install]]
|
||||
- [[Appendix][Appendix]]
|
||||
- [[Commands][Commands]]
|
||||
|
||||
* Install
|
||||
This module has no dependencies.
|
||||
|
||||
* Appendix
|
||||
** Commands
|
||||
| command | key / ex command | description |
|
||||
|------------+------------------+-------------------------------------------------------|
|
||||
| ~+sh/repl~ | =:repl= | Open a terminal (or send the current selection to it) |
|
||||
| command | key / ex command | description |
|
||||
|-----------------+------------------+-------------------------------------------------------|
|
||||
| ~+sh/open-repl~ | =:repl= | Open a terminal (or send the current selection to it) |
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
(defvar sh-shell-file)
|
||||
;;;###autoload
|
||||
(defun +sh/repl ()
|
||||
(defun +sh/open-repl ()
|
||||
"Open a shell REPL."
|
||||
(let* ((dest-sh (symbol-name sh-shell))
|
||||
(sh-shell-file dest-sh))
|
||||
|
@ -15,7 +15,7 @@
|
||||
:mode ("/bspwmrc\\'" . sh-mode)
|
||||
:config
|
||||
(set-electric! 'sh-mode :words '("else" "elif" "fi" "done" "then" "do" "esac" ";;"))
|
||||
(set-repl-handler! 'sh-mode #'+sh/repl)
|
||||
(set-repl-handler! 'sh-mode #'+sh/open-repl)
|
||||
|
||||
(setq sh-indent-after-continuation 'always)
|
||||
|
||||
|
Reference in New Issue
Block a user