From: Eshel Yaron Date: Wed, 15 Nov 2023 07:54:07 +0000 (+0100) Subject: Update Emacs configuration X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=705f43f894d09192fc9857e0d6b1eb90b11cc6e0;p=dotfiles.git Update Emacs configuration --- diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 7e21a9a..9170a85 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -131,7 +131,10 @@ ("mv" "README.texi" "devdocs.texi")))) (elpaca diff-hl) (elpaca (eat - :pre-build (("make" "terminfo")))) + :pre-build (("make" "terminfo") + ("makeinfo" "--no-split" "eat.texi") + ("touch" "dir") + ("install-info" "--dir=dir" "eat.info")))) (elpaca (elfeed :pre-build (("pandoc" "-o" "elfeed.texi" "README.md")))) (elpaca embark-consult) @@ -169,18 +172,8 @@ (elpaca rainbow-mode) (elpaca rg) (elpaca sqlformat) +(elpaca (mode-face :repo "https://git.sr.ht/~eshel/mode-face")) (elpaca terraform-mode) -(elpaca (vterm - :files ("*") - :pre-build (("pandoc" "-o" "vterm.org" "README.md") - ("emacs" "--batch" "-l" "ox-texinfo" "vterm.org" - "--eval" "(setq org-babel-confirm-evaluate-answer-no t)" - "-f" "org-texinfo-export-to-texinfo") - ("makeinfo" "--no-split" "vterm.texi") - ("touch" "dir") - ("install-info" - "--entry" "* vterm::" - "--section=Emacs" "--dir=dir" "vterm.info")))) (elpaca whitespace-cleanup-mode) (elpaca rfc-mode) (elpaca (auctex @@ -204,8 +197,10 @@ :doc "Keymap for `elpaca' commands." "r" #'elpaca-rebuild "e" #'elpaca-recipe - "u" #'elpaca-update - "U" #'elpaca-update-all + "f" #'elpaca-fetch + "F" #'elpaca-fetch-all + "u" #'elpaca-merge + "U" #'elpaca-merge-all "v" #'elpaca-visit "d" #'elpaca-delete "l" #'elpaca-log @@ -400,9 +395,6 @@ DEADLINE: %(format-time-string \"<%Y-%m-%d %H:%M>\" (org-read-date t t)) magit-repository-directories '(("~/checkouts/" . 1)) ;; have Dired operations target another visible Dired buffer dired-dwim-target t - vterm-max-scrollback 2048 - vterm-kill-buffer-on-exit nil - vterm-use-vterm-prompt-detection-method t ;; use MPV with EMMS emms-player-list '(emms-player-mpv) eww-auto-rename-buffer 'title @@ -551,9 +543,17 @@ DEADLINE: %(format-time-string \"<%Y-%m-%d %H:%M>\" (org-read-date t t)) (defun esy/ttyper () (interactive) - (let ((default-directory "~")) + (let ((default-directory "~") + (eat-kill-buffer-on-exit t)) (eat "ttyper -c ~/.config/ttyper/config.toml" t))) +(defun esy/terminal (arg) + (interactive "P") + (if (file-remote-p default-directory) + (let ((process-environment (cons "TERM=xterm-256color" process-environment))) + (eat "/bin/bash" arg)) + (eat nil arg))) + (defun esy/hut-builds () (interactive) (require 'eat) @@ -613,14 +613,13 @@ DEADLINE: %(format-time-string \"<%Y-%m-%d %H:%M>\" (org-read-date t t)) (point-max) filename)))) -(defface comint '((t :background "#fff2f3")) "") +(defface mode-face-lisp-interaction-mode '((t :background "#fff6d8")) "") + +(with-eval-after-load 'mode-face + (add-to-list 'mode-face-modes 'lisp-interaction-mode)) (with-eval-after-load 'comint - (keymap-set comint-mode-map "C-c C-q" #'esy/log-buffer) - (add-hook 'comint-mode-hook - (lambda () - (dolist (face '(default fringe mode-line-inactive)) - (face-remap-add-relative face 'comint))))) + (keymap-set comint-mode-map "C-c C-q" #'esy/log-buffer)) (defun esy/recent-log-summary () "Display a summary of my website's most recent access log." @@ -883,7 +882,7 @@ Interactively, POINT is point and KILL is the prefix argument." (keymap-global-set "C-c c" #'org-capture) (keymap-global-set "C-c l" #'org-store-link) (keymap-global-set "C-c a" #'org-agenda) -(keymap-global-set "C-c v" #'vterm-other-window) +(keymap-global-set "C-c v" #'esy/terminal) (keymap-global-set "C-c p" #'sweeprolog-prefix-map) (keymap-global-set "C-c S" #'scratch-buffer) (keymap-global-set "C-c m" #'esy/emms-map) @@ -920,6 +919,7 @@ Interactively, POINT is point and KILL is the prefix argument." (keymap-global-set "C-s-l" #'esy/pulse-line) (keymap-global-set "M-\"" #'insert-pair) (keymap-global-set "M-[" #'insert-pair) +(keymap-global-set "M-'" #'insert-pair) (keymap-global-set "M-]" #'up-list) (keymap-set ctl-x-map "b" #'consult-buffer) @@ -1184,7 +1184,6 @@ as the initial input for completion, and return that directory." lin-global-mode marginalia-mode minibuffer-depth-indicate-mode - mouse-avoidance-mode pixel-scroll-precision-mode recentf-mode repeat-mode @@ -1195,6 +1194,7 @@ as the initial input for completion, and return that directory." winner-mode completions-auto-update-mode global-corfu-mode + mode-face-global-mode )) (funcall mode)) @@ -1236,12 +1236,6 @@ as the initial input for completion, and return that directory." (add-to-list 'revert-without-query "\\.pdf\\'") -;;; Configure terminal emulation via `vterm' - -(with-eval-after-load 'vterm - (add-to-list 'vterm-tramp-shells '("kubernetes" "/bin/bash")) - (add-to-list 'vterm-tramp-shells '("ssh" "/bin/bash"))) - ;;; Remove some over-intrusive keybindings in `paredit' (with-eval-after-load 'paredit @@ -1288,16 +1282,10 @@ as the initial input for completion, and return that directory." ;;; Configure Help -(defface help '((t :background "#f0fff0")) "") - (with-eval-after-load 'help-fns (with-eval-after-load 'shortdoc (add-hook 'help-fns-describe-function-functions - #'shortdoc-help-fns-examples-function)) - (add-hook 'help-mode-hook - (lambda () - (dolist (face '(default fringe mode-line-inactive)) - (face-remap-add-relative face 'help))))) + #'shortdoc-help-fns-examples-function))) ;;; Configure dictionary diff --git a/.emacs.d/theme/esy-theme.el b/.emacs.d/theme/esy-theme.el index b5d4da4..abece97 100644 --- a/.emacs.d/theme/esy-theme.el +++ b/.emacs.d/theme/esy-theme.el @@ -43,6 +43,7 @@ mode-name mode-line-process minor-mode-alist (:eval (when (window-dedicated-p) " Dedicated")) + (eglot--managed-mode (" " (:eval (when (eglot--mode-line-format))))) "%n%])" (vc-mode vc-mode) mode-line-format-right-align @@ -53,7 +54,8 @@ " " (-3 "%p") "/%I ")) - '(elfeed-search-face-alist '((unread default)))) + '(elfeed-search-face-alist '((unread default))) + '(mode-face-faces '(default fringe mode-line-inactive))) (provide-theme 'esy) ;;; esy-theme.el ends here