summary refs log tree commit diff stats
path: root/user
diff options
context:
space:
mode:
Diffstat (limited to 'user')
-rw-r--r--user/emacs/.emacs.d/init.el206
1 files changed, 107 insertions, 99 deletions
diff --git a/user/emacs/.emacs.d/init.el b/user/emacs/.emacs.d/init.el
index c78f9c96..035a2dec 100644
--- a/user/emacs/.emacs.d/init.el
+++ b/user/emacs/.emacs.d/init.el
@@ -40,7 +40,7 @@
 
 (use-package crux
   :defer 1
-  :custom ((crux-reopen-as-root-mode nil)))
+  :config (crux-reopen-as-root-mode -1))
 
 ;;; Styles
 
@@ -70,9 +70,10 @@
 
 ;;; Chrome
 (use-package minions
-  :custom ((minions-mode-line-lighter "  ")
-           (minions-mode-line-delimiters nil)
-           (minions-mode t)))
+  :config (progn
+            (setq minions-mode-line-lighter "  "
+                  minions-mode-line-delimiters nil)
+            (minions-mode +1)))
 
 (column-number-mode +1)
 (use-package doom-modeline
@@ -142,7 +143,7 @@ With two prefix arguments, write out the day and month name."
               (general-unbind "s-x"))))
 
 (use-package avy
-  :custom ((avy-all-windows nil)))
+  :config (setq avy-all-windows nil))
 (use-package ace-link
   :after avy
   :commands (ace-link-setup-default)
@@ -152,8 +153,8 @@ With two prefix arguments, write out the day and month name."
 
 (use-package which-key
   :defer 5
-  :custom ((which-key-mode +1))
   :config (progn
+            (which-key-mode +1)
             (which-key-setup-side-window-right-bottom)))
 
 ;;; Minibuffer
@@ -216,7 +217,7 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
 ;; transition smex history to amx
 (let ((smex-save-file (concat user-emacs-directory "smex-items")))
   (use-package amx
-    :custom ((amx-history-length 100))))
+    :config (setq amx-history-length 100)))
 
 (use-package counsel
   :commands (counsel-unicode-char)
@@ -241,30 +242,32 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
 
 (use-package eyebrowse
   :after (evil)
-  :custom ((eyebrowse-new-workspace t)
-           (eyebrowse-mode t)
-           (eyebrowse-mode-line-left-delimiter "")
-           (eyebrowse-mode-line-right-delimiter "")
-           (eyebrowse-mode-line-separator " ")
-           (eyebrowse-mode-line-style 'always))
+  :config (progn
+            (setq eyebrowse-new-workspace t
+                  eyebrowse-mode-line-left-delimiter ""
+                  eyebrowse-mode-line-right-delimiter ""
+                  eyebrowse-mode-line-separator " "
+                  eyebrowse-mode-line-style 'always)
+            (eyebrowse-mode +1))
   :general (:keymaps 'evil-window-map
-	    "0" #'eyebrowse-switch-to-window-config-0
-            "1" #'eyebrowse-switch-to-window-config-1
-            "2" #'eyebrowse-switch-to-window-config-2
-            "3" #'eyebrowse-switch-to-window-config-3
-            "4" #'eyebrowse-switch-to-window-config-4
-            "5" #'eyebrowse-switch-to-window-config-5
-            "6" #'eyebrowse-switch-to-window-config-6
-            "7" #'eyebrowse-switch-to-window-config-7
-            "8" #'eyebrowse-switch-to-window-config-8
-            "9" #'eyebrowse-switch-to-window-config-9)
+                     "0" #'eyebrowse-switch-to-window-config-0
+                     "1" #'eyebrowse-switch-to-window-config-1
+                     "2" #'eyebrowse-switch-to-window-config-2
+                     "3" #'eyebrowse-switch-to-window-config-3
+                     "4" #'eyebrowse-switch-to-window-config-4
+                     "5" #'eyebrowse-switch-to-window-config-5
+                     "6" #'eyebrowse-switch-to-window-config-6
+                     "7" #'eyebrowse-switch-to-window-config-7
+                     "8" #'eyebrowse-switch-to-window-config-8
+                     "9" #'eyebrowse-switch-to-window-config-9)
   :ghook ('evil-after-load-hook #'eyebrowse-setup-evil-keys))
 
 (use-package winner
   :after evil
   :defer 8
-  :custom ((winner-mode t)
-           (winner-boring-buffers '("*Completions*" "*Help*" "*Apropos*" "*Buffer List*" "*info*" "*Compile-Log*")))
+  :config (progn
+            (setq winner-boring-buffers '("*Completions*" "*Help*" "*Apropos*" "*Buffer List*" "*info*" "*Compile-Log*"))
+            (winner-mode +1))
   :general (:keymaps 'evil-window-map
                     "u" #'winner-undo
                     "r" #'winner-redo
@@ -280,9 +283,10 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
 (use-package evil
   :demand t
   :commands (evil-mode evil-delete-buffer evil-ex-define-cmd)
-  :custom ((evil-shift-width 2)
-	   (evil-mode-line-format nil))
-  :config (evil-mode +1)
+  :config (progn
+            (setq evil-shift-width 2
+                  evil-mode-line-format nil)
+            (evil-mode +1))
   :general
   (:states 'motion
 	   "C-;" #'evil-avy-goto-line)
@@ -291,12 +295,12 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
   (:states '(normal motion)
            "g s" #'evil-avy-goto-symbol-1))
 
+(defvar evil-collection-company-use-tng nil)
 (use-package evil-collection
   :after (evil)
   :defer 3
   :demand t
   :commands (evil-collection-init)
-  :custom ((evil-collection-company-use-tng nil))
   :config (progn
 	    (evil-collection-init)))
 
@@ -308,27 +312,27 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
 (use-package evil-space
   :defer 1
   :after evil
-  :custom ((evil-space-mode t)))
+  :config (evil-space-mode +1))
 
 (use-package evil-surround
   :after evil
   :defer 2
-  :custom ((global-evil-surround-mode t)))
+  :config (global-evil-surround-mode +1))
 
 (use-package evil-commentary
   :after evil
   :defer 2
-  :custom ((evil-commentary-mode t)))
+  :config (evil-commentary-mode +1))
 
 (use-package evil-magit
   :after magit
-  :custom ((evil-magit-use-y-for-yank nil)))
+  :config (setq evil-magit-use-y-for-yank nil))
 
 (use-package evil-quickscope
   :after evil
   :commands (evil-quickscope-mode)
   :ghook ('(magit-mode-hook git-rebase-mode-hook) #'turn-off-evil-quickscope-mode)
-  :custom ((global-evil-quickscope-mode t)))
+  :config (global-evil-quickscope-mode +1))
 
 (use-package evil-org
   :after org
@@ -345,17 +349,17 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
 (use-package projectile
   :defer 1
   :defines projectile-command-map
-  :custom ((projectile-mode +1)
-           (projectile-completion-system 'ivy))
   :config (progn
             (add-to-list 'projectile-globally-ignored-files "package-lock.json")
             (add-to-list 'projectile-globally-ignored-files "pnpm-lock.yaml")
             (add-to-list 'projectile-project-root-files "package.json")
             (add-to-list 'projectile-project-root-files-bottom-up "pnpm-workspace.yaml")
-            (setq projectile-project-root-files-functions '(projectile-root-local
+            (setq projectile-completion-system 'ivy
+                  projectile-project-root-files-functions '(projectile-root-local
                                                             projectile-root-top-down
                                                             projectile-root-bottom-up
                                                             projectile-root-top-down-recurring))
+            (projectile-mode +1)
 	    (with-eval-after-load 'evil-ex
               (evil-ex-define-cmd "rg" #'ripgrep-regexp)
 	      (evil-ex-define-cmd "prg" #'projectile-ripgrep)
@@ -381,12 +385,11 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
 (use-package magit
   :defer 10
   :commands (magit-status magit-dispatch)
-  :custom ((magit-auto-revert-mode nil)
-           (magit-section-visibility-indicator nil)
-           (magit-diff-refine-hunk 'all)
-           (magit-display-buffer-function #'display-buffer)
-           (magit-completing-read-function #'ivy-completing-read))
   :config (progn
+            (setq magit-auto-revert-mode nil magit-section-visibility-indicator nil
+                  magit-diff-refine-hunk 'all
+                  magit-display-buffer-function #'display-buffer
+                  magit-completing-read-function #'ivy-completing-read)
             (global-magit-file-mode +1)
             (remove-hook 'magit-section-highlight-hook 'magit-section-highlight)
             (remove-hook 'magit-section-highlight-hook 'magit-section-highlight-selection)
@@ -415,7 +418,7 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
 (use-package git-messenger
   :commands (git-messenger:popup-message)
   :defer 10
-  :custom ((git-messenger:use-magit-popup t)))
+  :config (setq git-messenger:use-magit-popup t))
 
 (use-package git-timemachine
   :commands (git-timemachine))
@@ -432,15 +435,15 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
 (use-package company
   :defer 2
   :commands (company-explicit-action-p)
-  :custom ((global-company-mode +1)
-           (company-idle-delay 0)
-           (company-tooltip-align-annotations t)
-           (company-show-numbers t)
-           (company-dabbrev-downcase nil)
-           (company-dabbrev-ignore-case nil)
-           (company-begin-commands '(self-insert-command))
-           (company-auto-complete #'company-explicit-action-p)
-           (company-auto-complete-chars '(?\ ?\( ?\) ?.)))
+  :config (setq global-company-mode +1
+           company-idle-delay 0
+           company-tooltip-align-annotations t
+           company-show-numbers t
+           company-dabbrev-downcase nil
+           company-dabbrev-ignore-case nil
+           company-begin-commands '(self-insert-command)
+           company-auto-complete #'company-explicit-action-p
+           company-auto-complete-chars '(?\ ?\( ?\) ?.))
   :general (:states 'insert
                     "TAB" #'company-indent-or-complete-common))
 
@@ -460,7 +463,7 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
   :commands (company-tabnine)
   :after (company-lsp)
   :load-path (lambda () (list (company-tabnine-load-path)))
-  :custom ((company-tabnine-binaries-folder "~/.local/tabnine"))
+  :config (setq company-tabnine-binaries-folder "~/.local/tabnine")
   :general ("<M-tab>" #'company-tabnine-call-other-backends
             "<C-tab>" #'company-tabnine-call-other-backends)
   :init (progn
@@ -470,13 +473,15 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
 
 (use-package eldoc
   :defer 5
-  :custom ((global-eldoc-mode +1)
-           (eldoc-idle-delay 0.5)))
+  :config (progn
+            (setq eldoc-idle-delay 0.5)
+            (global-eldoc-mode +1)))
 
 (use-package eldoc-box
   :after (eldoc eglot)
-  :custom ((eldoc-box-hover-mode +1)
-           (eldoc-box-hover-at-point-mode +1)))
+  :config (progn
+            (eldoc-box-hover-mode +1)
+            (eldoc-box-hover-at-point-mode +1)))
 
 (use-package ehelp
   :defer 15)
@@ -501,8 +506,10 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
 ;;;; Auto-reloading
 
 (use-package autorevert
-  :custom ((global-auto-revert-mode t)
-           (auto-revert-verbose t)))
+  :config (progn
+            (setq auto-revert-verbose t
+                  auto-revert-use-notify t)
+            (global-auto-revert-mode t)))
 
 ;;;; Backups
 
@@ -549,15 +556,15 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
   :init (progn
           (with-eval-after-load 'evil-ex
             (evil-ex-define-cmd "esh[ell]" #'eshell)))
-  :custom ((eshell-prompt-function (lambda ()
-                                     (concat (eshell/pwd) "\n$ ")))
-           (eshell-prompt-regexp "^[$][[:blank:]]")
-           (eshell-cmpl-cycle-completions nil)))
+  :config (setq eshell-prompt-function (lambda ()
+                                         (concat (eshell/pwd) "\n$ "))
+                eshell-prompt-regexp "^[$][[:blank:]]"
+                eshell-cmpl-cycle-completions nil))
 
 (use-package eshell-toggle
   :after projectile
   :commands (eshell-toggle)
-  :custom ((eshell-toggle-use-projectile-root t)))
+  :config (setq eshell-toggle-use-projectile-root t))
 
 (use-package esh-autosuggest
   :after eshell
@@ -581,9 +588,10 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
 (use-package fish-completion
   :when (executable-find "fish")
   :after (bash-completion)
-  :custom ((fish-completion-fallback-on-bash-p t))
   :commands (global-fish-completion-mode)
-  :config (global-fish-completion-mode))
+  :config (progn
+            (setq fish-completion-fallback-on-bash-p t)
+            (global-fish-completion-mode)))
 
 (use-package esh-help
   :after (eshell)
@@ -712,29 +720,28 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
 	     org-journal-new-entry
 	     org-journal-new-scheduled-entry)
   :gfhook (#'variable-pitch-mode)
-  :custom ((org-journal-date-format "%A, %d %B %Y")
-           (org-journal-dir "~/Documents/journal")))
+  :config (setq org-journal-date-format "%A, %d %B %Y"
+                org-journal-dir "~/Documents/journal"))
 
 ;;;; web modes (tsx, html)
 
 (use-package web-mode
   :mode (("\\.tsx" . web-mode))
-  :custom ((web-mode-enable-auto-pairing nil)
-           (web-mode-code-indent-offset 2)
-           (web-mode-markup-indent-offset 2)
-           (web-mode-css-indent-offset 2)
-           (web-mode-style-padding 0)
-           (web-mode-script-padding 0)))
+  :config (setq web-mode-enable-auto-pairing nil
+                web-mode-code-indent-offset 2
+                web-mode-markup-indent-offset 2
+                web-mode-css-indent-offset 2
+                web-mode-style-padding 0
+                web-mode-script-padding 0))
 
 ;;; IDE features
 
 (fringe-helper-define 'left-vertical-bar '(center repeated)
   "XXX.....")
 (use-package flymake
-  :custom ((flymake-error-bitmap '(left-vertical-bar compilation-error))
-           (flymake-warning-bitmap '(left-vertical-bar compilation-warning))))
+  :config (setq flymake-error-bitmap '(left-vertical-bar compilation-error)
+                flymake-warning-bitmap '(left-vertical-bar compilation-warning)))
 (use-package flycheck
-  :custom ((flycheck-highlighting-mode 'sexps))
   :ghook ('(typescript-mode-hook
             dockerfile-mode-hook
             yaml-mode-hook
@@ -744,7 +751,8 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
             html-mode-hook
             haskell-mode-hook))
   :config (progn
-            (setq flycheck-check-syntax-automatically '(save idle-change idle-buffer-switch mode-enabled))
+            (setq flycheck-check-syntax-automatically '(save idle-change idle-buffer-switch mode-enabled)
+                  flycheck-highlighting-mode 'sexps)
             (flycheck-define-error-level 'error
               :severity 100
               :compilation-level 2
@@ -781,11 +789,11 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
             html-mode-hook
             haskell-mode-hook)
           #'lsp)
-  :custom ((lsp-auto-guess-root t)
-           (lsp-auto-configure nil)
-           (lsp-prefer-flymake nil)
-           (lsp-enable-symbol-highlighting nil))
   :config (progn
+            (setq lsp-auto-guess-root t
+                  lsp-auto-configure nil
+                  lsp-prefer-flymake nil
+                  lsp-enable-symbol-highlighting nil)
             (add-to-list 'lsp-language-id-configuration '(js-mode . "javascript"))))
 
 (use-package lsp-clients
@@ -799,10 +807,10 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
                     "gr" #'lsp-ui-peek-find-references
                     "C-t" #'lsp-ui-peek-jump-backward)
   :config (progn
-            (setq-default lsp-ui-doc-mode nil))
-  :custom ((lsp-ui-sideline-enable t)
-           (lsp-ui-sideline-show-code-actions nil)
-           (lsp-enable-snippet nil)))
+            (setq lsp-enable-snippet nil
+                  lsp-ui-sideline-show-code-actions nil
+                  lsp-ui-sideline-enable t)
+            (setq-default lsp-ui-doc-mode nil)))
 
 (use-package lsp-haskell
   :after lsp-mode)
@@ -817,9 +825,9 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
 ;;;; Reformat on save
 
 (use-package prettier-js
-  :custom ((prettier-js-show-errors 'echo))
   :ghook ('(javascript-mode-hook typescript-mode-hook) #'prettier-js-mode t)
   :config (progn
+            (setq prettier-js-show-errors 'echo)
             (if-let ((prettier_d (executable-find "prettier_d")))
                 (setq prettier-js-command prettier_d
                       prettier-js-args '("--pkg-conf" "--parser" "typescript"))
@@ -834,20 +842,20 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
   :if (executable-find "mu")
   :commands (mu4e)
   :defines (mu4e-contexts)
-  :custom ((mu4e-completing-read-function #'ivy-completing-read)
-           (mu4e-maildir "~/mail")
-           (mu4e-context-policy 'pick-first)
-           (mu4e-update-interval 600)
-           (mu4e-change-filenames-when-moving t)
-           (mu4e-index-lazy-check t)
-           (mu4e-hide-index-messages t)
-           (mu4e-compose-format-flowed t))
   :init (progn
-         (with-eval-after-load 'evil-ex
-           (evil-ex-define-cmd "mu[4e]" #'mu4e)))
+          (with-eval-after-load 'evil-ex
+            (evil-ex-define-cmd "mu[4e]" #'mu4e)))
   :config (progn
-            (setq mail-user-agent #'mu4e-user-agent)
-            (setq mu4e-contexts (list
+            (setq mail-user-agent #'mu4e-user-agent
+                  mu4e-completing-read-function #'ivy-completing-read
+                  mu4e-maildir "~/mail"
+                  mu4e-context-policy 'pick-first
+                  mu4e-update-interval 600
+                  mu4e-change-filenames-when-moving t
+                  mu4e-index-lazy-check t
+                  mu4e-hide-index-messages t
+                  mu4e-compose-format-flowed t
+                  mu4e-contexts (list
                                  (make-mu4e-context
                                   :name "SatoshiPay"
                                   :match-func (lambda (msg)