summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRavi R Kiran <aine.marina@gmail.com>2022-04-16 00:49:17 (GMT)
committerRavi R Kiran <aine.marina@gmail.com>2022-04-16 00:49:17 (GMT)
commit4eadb62c312979a73f3729bed0c3410f08a8d330 (patch)
treef756b5fbad334c758cb9d6af9bd7f4f4a1fd3874
parent2885037af906a46a620f90004f160b449233b788 (diff)
downloaddotemacs-4eadb62c312979a73f3729bed0c3410f08a8d330.zip
dotemacs-4eadb62c312979a73f3729bed0c3410f08a8d330.tar.gz
dotemacs-4eadb62c312979a73f3729bed0c3410f08a8d330.tar.bz2
Defer loading more packages
-rw-r--r--lisp/ravi-init-appearance.el3
-rw-r--r--lisp/ravi-init-files.el33
-rw-r--r--lisp/ravi-init-insertion.el11
-rw-r--r--lisp/ravi-init-navigation.el21
-rw-r--r--lisp/ravi-init-repl.el7
-rw-r--r--lisp/ravi-init-vc.el6
-rw-r--r--lisp/ravi-init-web.el7
7 files changed, 39 insertions, 49 deletions
diff --git a/lisp/ravi-init-appearance.el b/lisp/ravi-init-appearance.el
index 0ff1812..eee250f 100644
--- a/lisp/ravi-init-appearance.el
+++ b/lisp/ravi-init-appearance.el
@@ -368,8 +368,7 @@ Delete all whitespace on a successive key press."
(bind-key "C-x 3" 'ravi/split-window-horizontally-and-switch)
(use-package pdf-tools
- ;; Install this locally; no update from MELPA needed.
- ;; :mode (("\\.pdf\\'" . pdf-view-mode)) ;; errors first use; to do.
+ :mode (("\\.pdf\\'" . pdf-view-mode))
:if window-system
:config
(progn
diff --git a/lisp/ravi-init-files.el b/lisp/ravi-init-files.el
index f7617b8..b205a24 100644
--- a/lisp/ravi-init-files.el
+++ b/lisp/ravi-init-files.el
@@ -115,6 +115,7 @@ not exist, it is not added to the filecache."
)))
(use-package tramp
+ :defer t
:config
(progn
(add-to-list 'tramp-remote-path 'tramp-own-remote-path)
@@ -134,29 +135,21 @@ not exist, it is not added to the filecache."
;; Git/svn/etc. projects
(use-package projectile
:init
- (progn
- (use-package pkg-info)
- (setq projectile-known-projects-file
- (ravi/past-file "projectile-bookmarks.eld"))
- )
+ (setq projectile-known-projects-file
+ (ravi/past-file "projectile-bookmarks.eld"))
:bind-keymap ("C-c p" . projectile-command-map)
:bind(("C-<f2>" . projectile-find-file-dwim))
:config
- (progn
- (projectile-global-mode)
-
- (bind-key "C-<f2>" 'projectile-find-file-dwim)
- (if (and (boundp 'ravi/use-selection-system)
- (equal ravi/use-selection-system 'helm))
- (progn
- (setq projectile-completion-system 'helm)
-
- (use-package helm-projectile
- :config
- (progn
- (helm-projectile-on)
- (bind-key "M-s M-g" 'helm-projectile-ag))))
- (bind-key "M-s M-g" 'projectile-ag)))
+ (projectile-global-mode)
+
+ (if (equal ravi/use-selection-system 'helm)
+ (progn
+ (setq projectile-completion-system 'helm)
+ (use-package helm-projectile
+ :config
+ (helm-projectile-on)
+ (bind-key "M-s M-g" 'helm-projectile-ag)))
+ (bind-key "M-s M-g" 'projectile-ag))
:diminish projectile-mode)
;; Use emacsclient as external editor for kmail
diff --git a/lisp/ravi-init-insertion.el b/lisp/ravi-init-insertion.el
index 2a29460..37a7849 100644
--- a/lisp/ravi-init-insertion.el
+++ b/lisp/ravi-init-insertion.el
@@ -110,19 +110,18 @@
(use-package company-c-headers
:init
- (progn
- (add-to-list 'company-backends 'company-c-headers))
+ (add-to-list 'company-backends 'company-c-headers)
+ :commands (company-c-headers)
:config
- (progn
- (defun ravi/get-default-include-paths ()
- (let* ((gcc-out (shell-command-to-string "g++ -E -x c++ - -v < /dev/null"))
+ (defun ravi/get-default-include-paths (compiler-executable)
+ (let* ((gcc-out (shell-command-to-string (concat compiler-executable " -E -x c++ - -v < /dev/null")))
(gcc-list-match (string-match "#include <...> search starts here:\n\\(.*\\(?:\n.*\\)*?\\)End of search list.\n" gcc-out))
(combined-list (match-string 1 gcc-out))
;; Need the following rigamarole to handle paths with spaces in them
(path-list-with-spaces (and combined-list (split-string combined-list "\n" t)))
(path-list (and path-list-with-spaces (mapcar 's-trim-left path-list-with-spaces))))
path-list))
- (mapc (lambda (dir) (add-to-list 'company-c-headers-path-system dir)) (ravi/get-default-include-paths))))
+ (mapc (lambda (dir) (add-to-list 'company-c-headers-path-system dir)) (ravi/get-default-include-paths "gcc")))
;; To do: enable when moving to emacs 26+
;; (use-package company-box :hook (company-mode-hook . company-box-mode) :ensure t)
diff --git a/lisp/ravi-init-navigation.el b/lisp/ravi-init-navigation.el
index a71f5dd..610b0a7 100644
--- a/lisp/ravi-init-navigation.el
+++ b/lisp/ravi-init-navigation.el
@@ -1,4 +1,4 @@
-;;; ravi-init-navigation.el --- navigation utilities
+;;; ravi-init-navigation.el --- navigation utilities -*- lexical-binding: t; -*-
;; Copyright (C) 2013
@@ -138,19 +138,16 @@
:bind ("s-." . imenu-anywhere))
(use-package expand-region
- :config
- (progn
- (bind-key "C-=" 'er/expand-region)))
+ :bind ("C-=" . 'er/expand-region))
(use-package multiple-cursors
- :bind (("C-S-c C-S-c" . mc/edit-lines)
-
- ("C->" . mc/mark-next-like-this)
+ :bind (("C->" . mc/mark-next-like-this)
("C-<" . mc/mark-previous-like-this)
("C-c C-<" . mc/mark-all-like-this))
- :commands (mc/mark-more-like-this-extended)
+ :commands (mc/mark-more-like-this-extended mc/edit-lines)
:init
(setq mc/list-file (ravi/emacs-file "past/mc-lists.el"))
+ (bind-key (if (xterm-kitty-in-use) "C-C C-C" "C-S-c C-S-c") #'mc/edit-lines)
(with-eval-after-load "region-bindings-mode"
(bind-key "a" 'mc/mark-all-like-this region-bindings-mode-map)
(bind-key "p" 'mc/mark-previous-like-this region-bindings-mode-map)
@@ -247,7 +244,8 @@
:bind (("C-a" . mwim-beginning)
("C-e" . mwim-end)))
-(use-package ialign)
+(use-package ialign
+ :commands ialign)
;; Use current line for region-based commands if no region selected
(use-package whole-line-or-region
@@ -269,7 +267,8 @@
;; grep and friends
-(use-package wgrep)
+(use-package wgrep
+ :defer t)
(if (executable-find "ag")
;; Prefer the silver-searcher if available
@@ -379,7 +378,5 @@
(require 'midnight)
-;; to do: add zeal-at-point
-
(provide 'ravi-init-navigation)
;;; ravi-init-navigation.el ends here
diff --git a/lisp/ravi-init-repl.el b/lisp/ravi-init-repl.el
index bd3e795..f33b614 100644
--- a/lisp/ravi-init-repl.el
+++ b/lisp/ravi-init-repl.el
@@ -26,10 +26,9 @@
(use-package comint
:defer t
- :config
- (progn
- (bind-key "<up>" 'comint-previous-matching-input-from-input comint-mode-map)
- (bind-key "<down>" 'comint-next-matching-input-from-input comint-mode-map))
+ :bind (:map comint-mode-map
+ ("<up>" . comint-previous-matching-input-from-input)
+ ("<down>" . comint-next-matching-input-from-input))
:ensure nil)
(use-package octave-mod
diff --git a/lisp/ravi-init-vc.el b/lisp/ravi-init-vc.el
index 1244928..b923d53 100644
--- a/lisp/ravi-init-vc.el
+++ b/lisp/ravi-init-vc.el
@@ -86,8 +86,10 @@
;; Use 'git config --add magit.extension svn' in repository to enable
;; magit-svn for that repository
-(use-package magit-svn)
-(use-package git-modes)
+(use-package magit-svn
+ :after (magit))
+(use-package git-modes
+ :after (magit))
(use-package git-messenger
:if window-system
:bind ("C-x v p" . git-messenger:popup-message))
diff --git a/lisp/ravi-init-web.el b/lisp/ravi-init-web.el
index 508f089..f8c5f63 100644
--- a/lisp/ravi-init-web.el
+++ b/lisp/ravi-init-web.el
@@ -59,9 +59,10 @@
;; Interact with the browser
(use-package skewer-mode
- :config
- (progn
- (skewer-setup)))
+ :commands (skewer-setup run-skewer)
+ :hook ((js2-mode-hook . skewer-mode)
+ (css-mode-hook . skewer-css-mode)
+ (html-mode-hook . skewer-html-mode)))
;; HTML with web-mode
(use-package web-mode