doom

My literate doom emacs config
git clone https://github.com/michaelneuper/doom.git
Files | Log | Refs

commit e0ecbef3f2dae1e149d66160a7b3756e4169f55c
parent c0b8f5d1d2ac8107b92f4e271ae790a50eb6c769
Author: Michael Neuper <michael@michaelneuper.com>
Date:   Tue,  4 Aug 2026 18:51:59 +0200

switch to doom's built-in ghostel module

Diffstat:
Mconfig.org | 86-------------------------------------------------------------------------------
Minit.el | 2+-
2 files changed, 1 insertion(+), 87 deletions(-)

diff --git a/config.org b/config.org @@ -960,92 +960,6 @@ so I use this environment variable to disable them when running inside vterm. :desc "Toggle vterm popup" "v" #'+vterm/toggle :desc "Open vterm here" "V" #'+vterm/here) #+end_src -*** other -**** ghostel -#+begin_src emacs-lisp :tangle packages.el -(package! ghostel) -(package! evil-ghostel) -#+end_src - -#+begin_src emacs-lisp -(use-package! ghostel - :defer t - :hook (ghostel-mode . mode-line-invisible-mode) - :init - (set-popup-rule! "^\\*doom:ghostel-popup:" :size 0.35 :vslot -4 :select t :quit nil :ttl nil) - - (setq ghostel-module-auto-install 'download) - :config - (ghostel-compile-global-mode 1)) - -(use-package! evil-ghostel - :after ghostel - :hook (ghostel-mode . evil-ghostel-mode)) -#+end_src - -Enable a ghostel popup similar to doom's =vterm= popup. -#+begin_src emacs-lisp -(defvar ghostel-buffer-name) - -(defun my/ghostel-toggle (arg) - "Toggle a Ghostel popup window at project root. - -If prefix ARG is non-nil, recreate the Ghostel buffer in the current -project's root." - (interactive "P") - (my/ghostel--configure-project-root-and-display - arg - (lambda () - (let ((buffer-name - (format "*doom:ghostel-popup:%s*" - (if (bound-and-true-p persp-mode) - (safe-persp-name (get-current-persp)) - "main"))) - confirm-kill-processes - current-prefix-arg) - (when arg - (let ((buffer (get-buffer buffer-name)) - (window (get-buffer-window buffer-name))) - (when (buffer-live-p buffer) - (kill-buffer buffer)) - (when (window-live-p window) - (delete-window window)))) - (if-let* ((win (get-buffer-window buffer-name t))) - (delete-window win) - (require 'ghostel) - (let ((ghostel-buffer-name buffer-name)) - (ghostel))) - (get-buffer buffer-name))))) - -(defun my/ghostel-here (arg) - "Open a Ghostel buffer in the current window at project root. - -If prefix ARG is non-nil, cd into `default-directory' instead of project root." - (interactive "P") - (my/ghostel--configure-project-root-and-display - arg - (lambda () - (let (display-buffer-alist) - (require 'ghostel) - (ghostel))))) - -(defun my/ghostel--configure-project-root-and-display (arg display-fn) - "Set project root context and display Ghostel using DISPLAY-FN. - -If prefix ARG is non-nil, cd into `default-directory' instead of project root." - (let* ((project-root (or (doom-project-root) default-directory)) - (default-directory - (if arg - default-directory - project-root))) - (setenv "PROOT" project-root) - (funcall display-fn))) - -(map! :leader - :desc "Ghostel popup" "o t" #'my/ghostel-toggle - :desc "Ghostel" "o T" #'my/ghostel-here) -#+end_src - ** :tools *** debugger #+begin_src emacs-lisp diff --git a/init.el b/init.el @@ -68,7 +68,7 @@ ;;shell ; simple shell REPL for Emacs ;;term ; basic terminal emulator for Emacs vterm ; the best terminal emulation in Emacs - ;;ghostel ; the best terminal emulation in Emacs + (ghostel +everywhere) ; the best terminal emulation in Emacs :checkers (syntax +flymake +icons) ; tasing you for every semicolon you forget