doom/modules/term/vterm/config.el

26 lines
893 B
EmacsLisp
Raw Normal View History

2022-04-08 20:52:08 +02:00
;;; term/vterm/config.el -*- lexical-binding: t; -*-
(use-package! vterm
:when (bound-and-true-p module-file-suffix)
:commands (vterm vterm-other-window)
:hook (vterm-mode . doom-mark-buffer-as-real-h)
:init
;; HACK Because vterm clusmily forces vterm-module.so's compilation on us when
;; the package is loaded, this is necessary to prevent it when
;; byte-compiling this file (`use-package' blocks eagerly loads packages
;; when compiled).
(when noninteractive
(advice-add #'vterm-module-compile :override #'ignore)
(provide 'vterm-module))
:config
(set-popup-rule! "^\\*vterm" :ignore t)
;; Once vterm is dead, the vterm buffer is useless. Why keep it around? We can
;; spawn another if we want one.
(setq vterm-kill-buffer-on-exit t)
(setq-hook! 'vterm-mode-hook
;; Prevent premature horizontal scrolling
hscroll-margin 0))