From 696d02ab160dd35f51ed19ed61cf13ffbf298597 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sat, 2 Dec 2023 22:42:47 +0300 Subject: chore(tazjin/emacs): minor configuration cleanups Deletes some stuff that I think isn't necessary anymore, and consolidates the modes.el content into settings.el. Change-Id: Ib682dbdb4eb89b3a7ee2eca89da4151af806a508 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10187 Reviewed-by: tazjin Tested-by: BuildkiteCI --- users/tazjin/emacs/config/functions.el | 4 ++-- users/tazjin/emacs/config/init.el | 1 - users/tazjin/emacs/config/modes.el | 32 -------------------------------- users/tazjin/emacs/config/settings.el | 21 +++++++++++++++++++++ 4 files changed, 23 insertions(+), 35 deletions(-) delete mode 100644 users/tazjin/emacs/config/modes.el (limited to 'users/tazjin') diff --git a/users/tazjin/emacs/config/functions.el b/users/tazjin/emacs/config/functions.el index 234423be39..d91627a882 100644 --- a/users/tazjin/emacs/config/functions.el +++ b/users/tazjin/emacs/config/functions.el @@ -15,13 +15,13 @@ (goto-line target))) (setq-local display-line-numbers nil))) -;; These come from the emacs starter kit - (defun esk-add-watchwords () (font-lock-add-keywords nil '(("\\<\\(FIX\\(ME\\)?\\|TODO\\|DEBUG\\|HACK\\|REFACTOR\\|NOCOMMIT\\)" 1 font-lock-warning-face t)))) +(add-hook 'prog-mode-hook 'esk-add-watchwords) + (defun esk-sudo-edit (&optional arg) (interactive "p") (if (or arg (not buffer-file-name)) diff --git a/users/tazjin/emacs/config/init.el b/users/tazjin/emacs/config/init.el index 9d78af8964..55004f5603 100644 --- a/users/tazjin/emacs/config/init.el +++ b/users/tazjin/emacs/config/init.el @@ -243,7 +243,6 @@ look-and-feel functions settings - modes bindings eshell-setup)) (ace-window-display-mode) diff --git a/users/tazjin/emacs/config/modes.el b/users/tazjin/emacs/config/modes.el deleted file mode 100644 index 1936365e5b..0000000000 --- a/users/tazjin/emacs/config/modes.el +++ /dev/null @@ -1,32 +0,0 @@ -;; Initializes modes I use. - -(add-hook 'prog-mode-hook 'esk-add-watchwords) -(add-hook 'prog-mode-hook 'hl-line-mode) - -;; Use auto-complete as completion at point -;; TODO(tazjin): what is this? -(defun set-auto-complete-as-completion-at-point-function () - (setq completion-at-point-functions '(auto-complete))) - -(add-hook 'auto-complete-mode-hook - 'set-auto-complete-as-completion-at-point-function) - -;; Enable rainbow-delimiters for all things programming -(add-hook 'prog-mode-hook 'rainbow-delimiters-mode) - -;; Always highlight matching brackets -(show-paren-mode 1) - -;; Always auto-close parantheses and other pairs -(electric-pair-mode) - -;; Keep track of recent files -(recentf-mode) - -;; Easily navigate sillycased words -(global-subword-mode 1) - -;; Transparently open compressed files -(auto-compression-mode t) - -(provide 'modes) diff --git a/users/tazjin/emacs/config/settings.el b/users/tazjin/emacs/config/settings.el index 0ab15a5ac6..6c66ca608d 100644 --- a/users/tazjin/emacs/config/settings.el +++ b/users/tazjin/emacs/config/settings.el @@ -65,4 +65,25 @@ (go-mode . go-ts-mode) (cmake-mode . cmake-ts-mode))) +;; Visually highlight current line in programming buffers +(add-hook 'prog-mode-hook 'hl-line-mode) + +;; Enable rainbow-delimiters for all things programming +(add-hook 'prog-mode-hook 'rainbow-delimiters-mode) + +;; Always highlight matching brackets +(show-paren-mode 1) + +;; Always auto-close parantheses and other pairs +(electric-pair-mode) + +;; Keep track of recent files +(recentf-mode) + +;; Easily navigate sillycased words +(global-subword-mode 1) + +;; Transparently open compressed files +(auto-compression-mode t) + (provide 'settings) -- cgit 1.4.1