doomemacs/modules/term/vterm/config.el
Marien Zwart 7ad387619d Fix vterm popup rule
akermu/emacs-libvterm@c2c2c8afb9 changed
the default buffer name of vterm buffers, so Doom's popup-rule no longer
matches them. This causes functions like `+vterm/here` to use the entire
frame instead of creating a popup window.

Fix it by changing the popup rule to match the new naming scheme.
2021-04-14 22:40:05 +10:00

22 lines
791 B
EmacsLisp

;;; term/vterm/config.el -*- lexical-binding: t; -*-
(use-package! vterm
:when (bound-and-true-p module-file-suffix)
:commands vterm-mode
:hook (vterm-mode . doom-mark-buffer-as-real-h)
:hook (vterm-mode . hide-mode-line-mode) ; modeline serves no purpose in vterm
:config
(set-popup-rule! "^\\*vterm" :size 0.25 :vslot -4 :select t :quit nil :ttl 0)
;; Once vterm is dead, the vterm buffer is useless. Why keep it around? We can
;; spawn another if want one.
(setq vterm-kill-buffer-on-exit t)
;; 5000 lines of scrollback, instead of 1000
(setq vterm-max-scrollback 5000)
(setq-hook! 'vterm-mode-hook
;; Don't prompt about dying processes when killing vterm
confirm-kill-processes nil
;; Prevent premature horizontal scrolling
hscroll-margin 0))