Commit 18d7babc289b
dots/config/emacs/init.el
@@ -1021,6 +1021,24 @@ minibuffer, even without explicitly focusing it."
(vterm-kill-buffer-on-exit t)
(vterm-max-scrollback 100000))
+(use-package ghostel
+ :commands (ghostel)
+ :bind ("C-c t g" . vde/ghostel-toggle)
+ :config
+ (defun vde/ghostel-buffer ()
+ "Return the active ghostel buffer, or nil if none exists."
+ (seq-find (lambda (buf)
+ (string-match-p "\\*ghostel:" (buffer-name buf)))
+ (buffer-list)))
+ (defun vde/ghostel-toggle ()
+ "Toggle ghostel terminal buffer."
+ (interactive)
+ (let ((buf (vde/ghostel-buffer)))
+ (cond
+ ((not buf) (ghostel))
+ ((eq (current-buffer) buf) (bury-buffer))
+ (t (switch-to-buffer buf))))))
+
;; TODO adapt this to my needs
;; (defun tkj/vc-git-grep-current-line ()
;; "Search Git project for the current line."
home/common/dev/emacs.nix
@@ -107,6 +107,7 @@ let
rg
ready-player
pkgs.ytr
+ ghostel
scopeline
shr-tag-pre-highlight
surround