summaryrefslogtreecommitdiff
path: root/config/emacs
diff options
context:
space:
mode:
authorThomas Ulmer <thomasmulmer02@gmail.com>2026-03-16 09:00:34 -0700
committerThomas Ulmer <thomasmulmer02@gmail.com>2026-03-16 09:00:34 -0700
commit67b34cad69c084e5c08adb2fb69f42ae57b56221 (patch)
tree5eeec0258da887730b202c1caf44abb5dca7eb88 /config/emacs
parent3ca64ad7b3e9ca3774f7cfa98a2bc17e2992dfe6 (diff)
lots of emacs tweaks
Diffstat (limited to 'config/emacs')
-rw-r--r--config/emacs/init.el140
1 files changed, 66 insertions, 74 deletions
diff --git a/config/emacs/init.el b/config/emacs/init.el
index 19f640f..926ef54 100644
--- a/config/emacs/init.el
+++ b/config/emacs/init.el
@@ -116,7 +116,7 @@ reverse. Delete trailing whitespace."
"Do setup in for code buffers."
;; (superword-mode 1)
;; (modify-syntax-entry ?_ "w")
- (hs-minor-mode 1)
+ ;; (hs-minor-mode 1)
(display-fill-column-indicator-mode 1)
(smerge-mode 1)
(ignore-errors
@@ -341,6 +341,7 @@ With ARG, don't save the current layout."
(require 'eshell)
(require 'em-prompt)
(put 'other-window 'repeat-map nil)
+ (put 'other-window-backward 'repeat-map nil)
(put 'eshell-previous-prompt 'repeat-map nil)
(put 'eshell-next-prompt 'repeat-map nil)
@@ -368,6 +369,7 @@ With ARG, don't save the current layout."
(keymap-set my/keys-mode-map "M-(" 'my/wrap-region-paren)
(keymap-set my/keys-mode-map "M-z" 'my/zap-whitespace)
(keymap-set my/keys-mode-map "M-o" 'other-window)
+ (keymap-set my/keys-mode-map "M-O" 'other-window-backward)
(keymap-set my/keys-mode-map "M-RET" 'my/eshell)
(keymap-set my/keys-mode-map "M-C" 'calc)
(keymap-set my/keys-mode-map "M-K" 'my/kill-buffer)
@@ -621,27 +623,6 @@ With ARG, don't save the current layout."
:bind (:map minibuffer-local-map
("M-v" . 'vertico-flat-mode)))
-;; (use-package posframe ; child frames inside normal frames
-;; )
-;; (use-package vertico-posframe ; use posframes to display minibuffer
-;; :after vertico
-;; :demand t
-;; :custom
-;; (vertico-posframe-poshandler
-;; #'posframe-poshandler-frame-bottom-center)
-;; (vertico-posframe-size-function
-;; (lambda (buffer)
-;; (let ((w (frame-width)))
-;; (list
-;; :height (buffer-local-value 'vertico-posframe-height buffer)
-;; :min-height (or (buffer-local-value 'vertico-posframe-min-height buffer)
-;; (let ((height (+ vertico-count 1)))
-;; (min height (or (buffer-local-value 'vertico-posframe-height buffer) height))))
-;; :width w
-;; :min-width w))))
-;; :config
-;; (vertico-posframe-mode 1))
-
(use-package marginalia ; more info in minibuffer menus
:demand t
:custom
@@ -681,6 +662,16 @@ With ARG, don't save the current layout."
:config
(global-corfu-mode 1))
+(use-package cape ; extend completion frameworks
+ :demand t
+ :after orderless corfu
+ :bind ("C-c p" . cape-prefix-map)
+ :config
+ (advice-add 'pcomplete-completions-at-point :around 'cape-wrap-silent)
+ (defvar my/completion-at-point-functions-always-include
+ (list 'tags-completion-at-point-function 'cape-dabbrev 'tempel-complete))
+ (setq completion-at-point-functions my/completion-at-point-functions-always-include))
+
(use-package tempel ; templates
:demand t
:custom
@@ -694,17 +685,6 @@ With ARG, don't save the current layout."
:after tempel
:demand t)
-(use-package cape ; extend completion frameworks
- :demand t
- :bind ("C-c p" . cape-prefix-map)
- :config
- (advice-add 'pcomplete-completions-at-point :around 'cape-wrap-silent)
- ;; (advice-add 'pcomplete-completions-at-point :around 'cape-wrap-purify)
- (defvar my/completion-at-point-functions-always-include
- (list 'tags-completion-at-point-function 'cape-dabbrev 'cape-dict 'tempel-complete))
- ;; local settings should include t to also include global settings
- (setq completion-at-point-functions my/completion-at-point-functions-always-include))
-
(use-package ibuffer-vc ; group buffers by vcs directory
:after ibuffer
:demand t
@@ -715,6 +695,14 @@ With ARG, don't save the current layout."
(unless (eq ibuffer-sorting-mode 'alphabetic)
(ibuffer-do-sort-by-alphabetic)))))
+(use-package eldoc-box
+ :after eldoc
+ :demand t
+ :custom
+ (eldoc-box-clear-with-C-g t)
+ :hook
+ (eldoc-mode . eldoc-box-hover-mode))
+
(use-package free-keys ; display a list of unbound keys
)
@@ -868,44 +856,44 @@ With ARG, don't save the current layout."
;; (prog-mode . flycheck-mode)
)
-(progn ; collected folding binds, hs + fold this
- (define-prefix-command 'my/fold-map)
- (global-set-key (kbd "M-F") 'my/fold-map)
- (define-keymap :full nil
- :parent nil
- :suppress nil
- :keymap nil
- :name "my/fold-map"
- :prefix 'my/fold-map)
- (progn ; hideshow folding
- (keymap-set my/fold-map "t" 'hs-toggle-hiding)
- (keymap-set my/fold-map "l" 'hs-hide-level)
- (keymap-set my/fold-map "C-t" 'hs-hide-all)
- (keymap-set my/fold-map "C-a" 'hs-show-all))
-
- (use-package fold-this ; fold arbitrary region
- :init
- (defun my/fold-this-fold-forward (&optional arg)
- "Fold forward ARG number of sexps, defaulting to one."
- (interactive "p")
- (push-mark)
- (forward-sexp arg)
- (fold-this (mark) (point))
- (pop-mark))
-
- (defun my/fold-this-fold-backward (&optional arg)
- "Fold backward ARG number of sexps, defaulting to one."
- (interactive "p")
- (push-mark)
- (backward-sexp arg)
- (fold-this (point) (mark))
- (pop-mark))
-
- :bind (:map my/fold-map
- ("c" . fold-this)
- ("e" . fold-this-unfold-at-point)
- ("f" . my/fold-this-fold-forward)
- ("b" . my/fold-this-fold-backward))))
+;; (progn ; collected folding binds, hs + fold this
+;; (define-prefix-command 'my/fold-map)
+;; (global-set-key (kbd "M-F") 'my/fold-map)
+;; (define-keymap :full nil
+;; :parent nil
+;; :suppress nil
+;; :keymap nil
+;; :name "my/fold-map"
+;; :prefix 'my/fold-map)
+;; (progn ; hideshow folding
+;; (keymap-set my/fold-map "t" 'hs-toggle-hiding)
+;; (keymap-set my/fold-map "l" 'hs-hide-level)
+;; (keymap-set my/fold-map "C-t" 'hs-hide-all)
+;; (keymap-set my/fold-map "C-a" 'hs-show-all))
+
+;; (use-package fold-this ; fold arbitrary region
+;; :init
+;; (defun my/fold-this-fold-forward (&optional arg)
+;; "Fold forward ARG number of sexps, defaulting to one."
+;; (interactive "p")
+;; (push-mark)
+;; (forward-sexp arg)
+;; (fold-this (mark) (point))
+;; (pop-mark))
+
+;; (defun my/fold-this-fold-backward (&optional arg)
+;; "Fold backward ARG number of sexps, defaulting to one."
+;; (interactive "p")
+;; (push-mark)
+;; (backward-sexp arg)
+;; (fold-this (point) (mark))
+;; (pop-mark))
+
+;; :bind (:map my/fold-map
+;; ("c" . fold-this)
+;; ("e" . fold-this-unfold-at-point)
+;; ("f" . my/fold-this-fold-forward)
+;; ("b" . my/fold-this-fold-backward))))
(use-package clang-format ; let clang do c formatting
)
@@ -960,6 +948,9 @@ With ARG, don't save the current layout."
:bind (:map text-mode-map
("M-l" . 'dict-map)))
+(use-package olivetti ; center content per buffer
+ )
+
;; (use-package erc ; irc client
;; :init
;; (defun my/start-erc ()
@@ -1001,13 +992,14 @@ With ARG, don't save the current layout."
(advice-add 'ispell-mode :before 'debug)
(setq-default text-mode-hook (cons 'ispell-minor-mode (remove 'ispell-mode text-mode-hook))))
-(load-file "/home/tmu/.emacs.d/site-lisp/my-modal.el")
-
;;; Optional files for occasional loading:
+(autoload 'mm/global-modal-mode "/home/tmu/.emacs.d/site-lisp/my-modal.el" "" t)
+(autoload 'single-header-mode "/home/tmu/.emacs.d/site-lisp/single-header.el" "" t)
+
+(load-file "/home/tmu/.emacs.d/site-list/my-eglot.el")
;; if you want exwm, include from ~/.emacs.d/site-lisp/my-exwm.el
;; if you want mail, include from ~/.emacs.d/site-lisp/my-mail.el
-;; if you want eglot, include from ~/.emacs.d/site-lisp/my-eglot.el
;;; Theming: