diff options
author | bd <bdunahu@operationnull.com> | 2024-11-24 23:26:05 -0500 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2024-11-24 23:26:05 -0500 |
commit | 6ab62f8037ce1136a4d7c654199b5d40095205ed (patch) | |
tree | 68f378e6f5645225d601ff4e993448d9771f5864 | |
parent | b5a912fe889312d4e2b1544b295557e7cdd179e7 (diff) |
hl-line in prog/text mode only, remove redundant rcirc mode string
-rw-r--r-- | .config/emacs/init.el | 12 | ||||
-rw-r--r-- | .config/emacs/modules/bd--devel.el | 27 | ||||
-rw-r--r-- | .config/emacs/modules/bd--files.el | 2 | ||||
-rw-r--r-- | .config/emacs/modules/bd--irc.el | 10 |
4 files changed, 32 insertions, 19 deletions
diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 75686b5..ed8b8d1 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -20,9 +20,10 @@ (keymap-global-unset "C-z") (keymap-global-unset "C-x C-z") -(global-set-key (kbd "C-x C-b") 'ibuffer) -(global-set-key (kbd "C-z =") 'text-scale-increase) -(global-set-key (kbd "C-z -") 'text-scale-decrease) +(keymap-global-set "C-x C-b" #'ibuffer) +(keymap-global-set "C-z =" #'text-scale-increase) +(keymap-global-set "C-z -" #'text-scale-decrease) +(keymap-global-set "H-p" #'pop-to-mark-command) (setopt warning-minimum-level :error @@ -32,7 +33,11 @@ text-scale-mode-step 1.1 + set-mark-command-repeat-pop t + kill-whole-line t + kill-ring-max 1000 + sentence-end-double-space nil next-line-add-newlines t scroll-up-aggressively '0.50 @@ -46,7 +51,6 @@ (blink-cursor-mode -1) (indent-tabs-mode 0) (fringe-mode '(0 . 0)) -(global-hl-line-mode 1) (global-visual-line-mode t) (menu-bar-mode -1) (minibuffer-depth-indicate-mode 1) diff --git a/.config/emacs/modules/bd--devel.el b/.config/emacs/modules/bd--devel.el index cc8abfb..4238358 100644 --- a/.config/emacs/modules/bd--devel.el +++ b/.config/emacs/modules/bd--devel.el @@ -3,11 +3,6 @@ ;;; Code: -(add-hook 'prog-mode-hook (lambda () - (font-lock-add-keywords - nil '(("\\<\\(FIX\\(ME\\)?\\|TODO\\)" - 1 font-lock-warning-face t))))) - (setopt display-line-numbers-type 'relative) (defvar bd/enable-line-numbers-in-hooks '(prog-mode-hook) @@ -24,7 +19,11 @@ to.") (use-package prog-mode :hook ((js-mode . (lambda () - (add-to-list 'prettify-symbols-alist '("function" . ?ƒ))))) + (add-to-list 'prettify-symbols-alist '("function" . ?ƒ)))) + (prog-mode . (lambda () + (font-lock-add-keywords + nil '(("\\<\\(FIX\\(ME\\)?\\|TODO\\)" + 1 font-lock-warning-face t)))))) :config (global-prettify-symbols-mode 1)) @@ -42,6 +41,22 @@ to.") :custom (autoformat-mode 1)) +(use-package hl-line + :hook + ((prog-mode . hl-line-mode) + (text-mode . hl-line-mode)) + :config + (defun bd/face-ignore-hl (f &rest args) + "Wrapper around face-at-point, returning +the face under the hl-line-mode." + (if hl-line-mode + (progn + (hl-line-mode -1) + (prog1 (apply f args) + (hl-line-mode 1))) + (apply f args))) + (advice-add #'face-at-point :around #'bd/face-ignore-hl)) + (use-package compile :demand t :hook ((compilation-filter . ansi-color-compilation-filter)) diff --git a/.config/emacs/modules/bd--files.el b/.config/emacs/modules/bd--files.el index 28563ea..3d3d7b7 100644 --- a/.config/emacs/modules/bd--files.el +++ b/.config/emacs/modules/bd--files.el @@ -50,7 +50,7 @@ ((string-match (regexp-opt '("gba" "z64" "n64" "sfc")) ext) (runner #'bd/rom)) (t (apply f args))))) -(advice-add 'find-file :around #'bd/external-find-file-wrapper) +(advice-add #'find-file :around #'bd/external-find-file-wrapper) (use-package dired :bind diff --git a/.config/emacs/modules/bd--irc.el b/.config/emacs/modules/bd--irc.el index 6b7a2b1..004314a 100644 --- a/.config/emacs/modules/bd--irc.el +++ b/.config/emacs/modules/bd--irc.el @@ -9,7 +9,7 @@ :hook ((rcirc-mode . (lambda () (setopt fill-column-desired-width 80) - (rcirc-mode . fill-column-mode) + (fill-column-mode) (rcirc-omit-mode)))) :custom (rcirc-fill-column 80) @@ -22,13 +22,7 @@ :nick "Gondul" :user-name "Gondul" :port 6697 - :encryption tls))) - ;; for tab-bar - :config - (defvar-local bd/irc-status - '(:eval - rcirc-activity-string)) - (add-to-list 'global-mode-string bd/irc-status)) + :encryption tls)))) (provide 'bd--irc) |