about summary refs log tree commit diff
path: root/users
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2023-12-02T19·42+0300
committertazjin <tazjin@tvl.su>2023-12-02T20·58+0000
commit696d02ab160dd35f51ed19ed61cf13ffbf298597 (patch)
tree1e6544c94b8eedafeab47ee8a01e96d752da30b5 /users
parent3d618cdfdc4c3f74245370d294c0a1a49f38e92e (diff)
chore(tazjin/emacs): minor configuration cleanups r/7109
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 <tazjin@tvl.su>
Tested-by: BuildkiteCI
Diffstat (limited to 'users')
-rw-r--r--users/tazjin/emacs/config/functions.el4
-rw-r--r--users/tazjin/emacs/config/init.el1
-rw-r--r--users/tazjin/emacs/config/modes.el32
-rw-r--r--users/tazjin/emacs/config/settings.el21
4 files changed, 23 insertions, 35 deletions
diff --git a/users/tazjin/emacs/config/functions.el b/users/tazjin/emacs/config/functions.el
index 234423be3986..d91627a88247 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 9d78af8964a4..55004f56030d 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 1936365e5bdb..000000000000
--- 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 0ab15a5ac6bf..6c66ca608d6e 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)