summary refs log tree commit diff stats
path: root/user/emacs
diff options
context:
space:
mode:
Diffstat (limited to 'user/emacs')
-rw-r--r--user/emacs/init.el147
1 files changed, 73 insertions, 74 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el
index 353566d1..ba3f1dc4 100644
--- a/user/emacs/init.el
+++ b/user/emacs/init.el
@@ -462,80 +462,6 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
   :gfhook #'evil-org-set-key-theme)
 
 
-;;; Projects
-
-(use-package ripgrep
-  :config (progn
-            (setq ripgrep-arguments '("--hidden"))))
-
-(use-package projectile
-  :defer 1
-  :defines projectile-command-map
-  :general (:keymaps 'projectile-command-map
-                     "s s" #'projectile-ripgrep
-                     "s r" #'projectile-ripgrep)
-  :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-kill-buffers-filter 'kill-only-files
-                  projectile-sort-order 'modification-time
-                  projectile-project-root-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)
-              (evil-ex-define-cmd "pesh[ell]" #'projectile-run-eshell)
-              (evil-ex-define-cmd "pb" #'projectile-switch-to-buffer)
-              (evil-ex-define-cmd "psw[itch]" #'projectile-switch-project))))
-
-(use-package magit
-  :defer 5
-  :commands (magit-status magit-dispatch)
-  :custom (magit-auto-revert-mode nil)
-  :config (progn
-            (setq magit-section-visibility-indicator nil
-                  magit-diff-refine-hunk 'all
-                  magit-display-buffer-function #'display-buffer)
-            (remove-hook 'magit-status-sections-hook 'magit-insert-tags-header)
-            (remove-hook 'magit-section-highlight-hook 'magit-section-highlight)
-            (remove-hook 'magit-section-highlight-hook 'magit-section-highlight-selection)
-            (remove-hook 'magit-section-highlight-hook 'magit-diff-highlight)))
-
-(eval-when-compile (require 'fringe-helper))
-(use-package git-gutter-fringe
-  :defer 5
-  :config (progn
-            (add-hook 'magit-post-refresh-hook
-                      #'git-gutter:update-all-windows)
-            ;; places the git gutter outside the margins.
-            (setq-default fringes-outside-margins nil)
-            ;; thin fringe bitmaps
-            (fringe-helper-define 'git-gutter-fr:added '(center repeated)
-              "....XXX.")
-            (fringe-helper-define 'git-gutter-fr:modified '(center repeated)
-              "....XXX.")
-            (fringe-helper-define 'git-gutter-fr:deleted '(center repeated)
-              "....XXX.")
-            (setq git-gutter-fr:side 'right-fringe)
-            (global-git-gutter-mode 1)))
-
-(use-package git-messenger
-  :commands (git-messenger:popup-message)
-  :defer 10
-  :config (setq git-messenger:use-magit-popup t))
-
-(use-package git-timemachine
-  :commands (git-timemachine))
-
-(use-package editorconfig
-  :defer 2
-  :config (editorconfig-mode +1))
-
 ;;; Completion
 
 (use-package company
@@ -971,6 +897,79 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
               :fringe-face 'flycheck-fringe-info
               :info-list-face 'flycheck-error-list-info)))
 
+;;; Projects
+
+(use-package ripgrep
+  :config (progn
+            (setq ripgrep-arguments '("--hidden"))))
+
+(use-package projectile
+  :defer 1
+  :defines projectile-command-map
+  :general (:keymaps 'projectile-command-map
+                     "s s" #'projectile-ripgrep
+                     "s r" #'projectile-ripgrep)
+  :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-kill-buffers-filter 'kill-only-files
+                  projectile-sort-order 'modification-time
+                  projectile-project-root-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)
+              (evil-ex-define-cmd "pesh[ell]" #'projectile-run-eshell)
+              (evil-ex-define-cmd "pb" #'projectile-switch-to-buffer)
+              (evil-ex-define-cmd "psw[itch]" #'projectile-switch-project))))
+
+(use-package magit
+  :defer 5
+  :commands (magit-status magit-dispatch)
+  :init (customize-set-value 'magit-auto-revert-mode nil)
+  :config (progn
+            (setq magit-section-visibility-indicator nil
+                  magit-diff-refine-hunk 'all
+                  magit-display-buffer-function #'display-buffer)
+            (remove-hook 'magit-status-sections-hook 'magit-insert-tags-header)
+            (remove-hook 'magit-section-highlight-hook 'magit-section-highlight)
+            (remove-hook 'magit-section-highlight-hook 'magit-section-highlight-selection)
+            (remove-hook 'magit-section-highlight-hook 'magit-diff-highlight)))
+
+(use-package git-gutter-fringe
+  :defer 5
+  :config (progn
+            (add-hook 'magit-post-refresh-hook
+                      #'git-gutter:update-all-windows)
+            ;; places the git gutter outside the margins.
+            (setq-default fringes-outside-margins nil)
+            ;; thin fringe bitmaps
+            (fringe-helper-define 'git-gutter-fr:added '(center repeated)
+              "....XXX.")
+            (fringe-helper-define 'git-gutter-fr:modified '(center repeated)
+              "....XXX.")
+            (fringe-helper-define 'git-gutter-fr:deleted '(center repeated)
+              "....XXX.")
+            (setq git-gutter-fr:side 'right-fringe)
+            (global-git-gutter-mode 1)))
+
+(use-package git-messenger
+  :commands (git-messenger:popup-message)
+  :defer 10
+  :config (setq git-messenger:use-magit-popup t))
+
+(use-package git-timemachine
+  :commands (git-timemachine))
+
+(use-package editorconfig
+  :defer 2
+  :config (editorconfig-mode +1))
+
 (setq-default ispell-dictionary "en_GB-ise-w_accents")
 (setq ispell-extra-args '("--sug-mode=ultra" "--camel-case"))
 (use-package flyspell)