Skip to content

Commit

Permalink
tweak(with-editor): don't load on julia-repl
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Dec 9, 2023
1 parent f5aaca2 commit 393d297
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions modules/me-tools.el
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,15 @@

(use-package with-editor
:straight t
:hook ((shell-mode eshell-mode term-exec vterm-mode) . with-editor-export-editor)
:hook ((shell-mode eshell-mode term-exec vterm-mode) . with-editor-export-hg-editor)
:hook ((shell-mode eshell-mode term-exec vterm-mode) . with-editor-export-git-editor)
:hook ((shell-mode eshell-mode term-exec vterm-mode) . +with-editor-export-all)
:init
;; `julia-repl' seems to start on `term-mode', so let's check for it before exporting the editor
(defvar +with-editor-ignore-matching-buffers '("\\*julia\\*"))
(defun +with-editor-export-all ()
(unless (seq-some (+apply-partially-right #'string-match-p (buffer-name)) +with-editor-ignore-matching-buffers)
(with-editor-export-editor)
(with-editor-export-hg-editor)
(with-editor-export-git-editor)))
:bind (("<remap> <async-shell-command>" . with-editor-async-shell-command)
("<remap> <shell-command>" . with-editor-shell-command)))

Expand Down

0 comments on commit 393d297

Please sign in to comment.