summary refs log tree commit diff stats
path: root/tag-emacs
diff options
context:
space:
mode:
authorAlan Pearce2015-10-18 17:10:20 +0200
committerAlan Pearce2015-10-18 17:10:20 +0200
commit9b0ce6c53ae53474ef80eb8be8857cd45825a227 (patch)
tree4fac97d7413c6b544b9ea4a8668be9ef3c75fa11 /tag-emacs
parent0f5ee55c871c91f6f74ddc6a7eec24992e124525 (diff)
downloadnixfiles-9b0ce6c53ae53474ef80eb8be8857cd45825a227.tar.lz
nixfiles-9b0ce6c53ae53474ef80eb8be8857cd45825a227.tar.zst
nixfiles-9b0ce6c53ae53474ef80eb8be8857cd45825a227.zip
Emacs: Defer more packages
Diffstat (limited to 'tag-emacs')
-rw-r--r--tag-emacs/emacs.d/init.org101
1 files changed, 53 insertions, 48 deletions
diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org
index 677358e9..1f6b7333 100644
--- a/tag-emacs/emacs.d/init.org
+++ b/tag-emacs/emacs.d/init.org
@@ -218,10 +218,11 @@ It’s nice to be able to see at a glance which lines of a file have
 changed.  This package colours the fringe
 
 #+BEGIN_SRC emacs-lisp
-(req-package diff-hl
-  :init (progn
-          (global-diff-hl-mode)
-          (add-hook 'magit-refresh-file-buffer-hook #'diff-hl-update)))
+  (req-package diff-hl
+    :defer 2
+    :init (progn
+            (global-diff-hl-mode 1)
+            (add-hook 'magit-refresh-file-buffer-hook #'diff-hl-update)))
 #+END_SRC
 
 ** magit
@@ -275,11 +276,10 @@ Ring the bell sometimes, but not so often
 When I’m using dash in emacs lisp, it’s nice to have proper font
 locking for it.
 #+BEGIN_SRC emacs-lisp
-(req-package dash
-  :demand t
-  :init (setq dash-enable-fontlock t)
-  :config (progn
-            (dash--enable-fontlock 'dash-enable-font-lock t)))
+  (req-package dash
+    :commands (dash-enable-font-lock)
+    :init (progn
+            (add-hook 'emacs-lisp-mode-hook #'dash-enable-font-lock)))
 #+END_SRC
 
 ** Colours
@@ -532,7 +532,7 @@ that I can sudo on remote machines
 
 #+BEGIN_SRC emacs-lisp
   (req-package tramp
-    :defer t
+    :defer 7
     :config (progn
               (setq tramp-default-method (if (eq system-type 'windows-nt) "plinkx" "ssh")
                     tramp-default-user-alist '(("\\`su\\(do\\)?\\'" nil "root"))
@@ -662,9 +662,10 @@ guesses the correct settings for me.
 
 This is a frontend to the GPG-powered =pass= program.
 #+BEGIN_SRC emacs-lisp
-(req-package password-store
-  :config (progn
-            (setq password-store-password-length 16)))
+  (req-package password-store
+    :defer 15
+    :config (progn
+              (setq password-store-password-length 16)))
 #+END_SRC
 * Buffers
 
@@ -728,9 +729,10 @@ Sometimes I like to be able to focus on one block of code at a time.
 Normally narrowing hides everything else completely, which I don’t
 like.  This package just makes everything else lower-contrast.
 #+BEGIN_SRC emacs-lisp
-(req-package fancy-narrow
-  :diminish fancy-narrow-mode
-  :config (fancy-narrow-mode 1))
+  (req-package fancy-narrow
+    :defer 15
+    :diminish fancy-narrow-mode
+    :config (fancy-narrow-mode 1))
 #+END_SRC
 
 
@@ -884,7 +886,7 @@ seems to work perfectly well for me.
 Weeks start on Monday for me and I prefer ISO-style dates.
 #+BEGIN_SRC emacs-lisp
 (req-package calendar
-  :defer t
+  :defer 1
   :config (progn
             (setq calendar-week-start-day 1)
             (calendar-set-date-style 'iso)))
@@ -920,7 +922,7 @@ copying/moving files between them.
 
 #+BEGIN_SRC emacs-lisp
 (req-package dired
-  :defer t
+  :defer 3
   :config (progn
             (bind-key "<return>" #'dired-find-file dired-mode-map)
             (bind-key "^" (lambda () (interactive) (find-alternate-file "..")) dired-mode-map)
@@ -937,13 +939,14 @@ copying/moving files between them.
 I work with a lot of git projects.  Dired-k adds colours based upon
 the file’s git status.
 #+BEGIN_SRC emacs-lisp
-(req-package dired-k
-  :require dired
-  :init (progn
-          (add-hook 'dired-initial-position-hook #'dired-k))
-  :config (progn
-            (setq dired-k-human-readable t)
-            (bind-key "g" #'dired-k dired-mode-map)))
+  (req-package dired-k
+    :require dired
+    :defer 5
+    :init (progn
+            (add-hook 'dired-initial-position-hook #'dired-k))
+    :config (progn
+              (setq dired-k-human-readable t)
+              (bind-key "g" #'dired-k dired-mode-map)))
 #+END_SRC
 
 
@@ -951,15 +954,17 @@ Don’t show uninteresting files in dired listings.
 
 #+BEGIN_SRC emacs-lisp
   (req-package dired-x
-    :require dired
+    :commands (dired-omit-mode
+               dired-expunge)
     :config (progn
+              (setq dired-omit-files "#\\|\\.$"
+                    dired-omit-verbose nil
+                    dired-find-subdir t))
+    :init (progn
               (defun turn-on-dired-omit-mode ()
                 (interactive)
                 (dired-omit-mode 1))
-              (add-hook 'dired-mode-hook #'turn-on-dired-omit-mode)
-              (setq dired-omit-files "#\\|\\.$"
-                    dired-omit-verbose nil
-                    dired-find-subdir t)))
+              (add-hook 'dired-mode-hook #'turn-on-dired-omit-mode)))
 #+END_SRC
 
 #+BEGIN_SRC emacs-lisp
@@ -974,22 +979,22 @@ Don’t show uninteresting files in dired listings.
 Expand subfolders like a tree inside the parent
 
 #+BEGIN_SRC emacs-lisp
-(req-package dired-subtree
-  :defer t
-  :require dired
-  :config (progn
-            (setq dired-subtree-use-backgrounds nil)
-            (defun dired-subtree-maybe-up ()
-              "Jump up one subtree or directory"
-              (interactive)
-              (let ((ov (dired-subtree--get-ov)))
-                (if ov
-                    (progn (goto-char (overlay-start ov))
-                           (dired-previous-line 1))
-                  (dired-up-directory))))
-            (bind-key "^" #'dired-subtree-maybe-up dired-mode-map))
-  :init (progn
-          (bind-key "i" #'dired-subtree-toggle dired-mode-map)))
+  (req-package dired-subtree
+    :defer t
+    :require dired
+    :config (progn
+              (setq dired-subtree-use-backgrounds nil)
+              (defun dired-subtree-maybe-up ()
+                "Jump up one subtree or directory"
+                (interactive)
+                (let ((ov (dired-subtree--get-ov)))
+                  (if ov
+                      (progn (goto-char (overlay-start ov))
+                             (dired-previous-line 1))
+                    (dired-up-directory))))
+              (bind-key "^" #'dired-subtree-maybe-up dired-mode-map))
+    :init (progn
+            (bind-key "i" #'dired-subtree-toggle dired-mode-map)))
 #+END_SRC
 
 * Documentation
@@ -1001,7 +1006,7 @@ helps to make documentation for other languages easier to access
 
 #+BEGIN_SRC emacs-lisp
 (req-package helm-dash
-  :defer t
+  :defer 20
   :init (progn
           (defmacro ap/create-helm-dash-hook (mode docsets)
             (let* ((mode-s (symbol-name mode))
@@ -1509,7 +1514,7 @@ Org is wünderbar.
     :bind (("C-c C-a" . org-agenda-list)
            ("C-c a" . org-agenda)
            ("C-c l" . org-store-link))
-    :defer 10
+    :defer 8
     :init (setq org-replace-disputed-keys t)
     :config (progn
               (setq org-directory "~/Sync/org"