Skip to content

Commit

Permalink
tweak: faster startup by deferring more stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed May 19, 2024
1 parent 3a15522 commit 0fbf888
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
5 changes: 1 addition & 4 deletions core/me-builtin.el
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,6 @@ or file path may exist now."
(use-package project
:straight t
:after minemacs-loaded
:demand t
:hook (kill-emacs . +project-forget-zombie-projects)
:custom
(project-list-file (concat minemacs-local-dir "project-list.el"))
Expand Down Expand Up @@ -1233,7 +1232,6 @@ This variable should be set early, either in \"early-config.el\" or \"init-tweak
:demand t)

(use-package oc-biblatex
:straight (:type built-in)
:after oc
:demand t)

Expand Down Expand Up @@ -1261,7 +1259,7 @@ current line.")
(looking-at-p (concat "\\<" (regexp-opt +electric-indent-words))))))))

(use-package elec-pair
:hook (minemacs-after-startup . electric-pair-mode)
:hook (minemacs-first-file . electric-pair-mode)
:init
(defun +electric-pair-tweaks-h ()
;; Org mode tweaks
Expand Down Expand Up @@ -1361,7 +1359,6 @@ current line.")
("q" nil :color blue))))

(use-package octave
:mode ("\\.m\\'" . octave-mode)
:config
(defun +octave-eval-last-sexp ()
"Evaluate Octave sexp before point and print value into current buffer."
Expand Down
12 changes: 4 additions & 8 deletions core/me-completion.el
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
(use-package cape
:straight t
:after minemacs-first-file
:demand t
:commands +cape-apply-capf-super +toggle-cape-auto-capf-super
:preface
(defcustom +cape-global-capes '(tempel-complete :completion cape-dict)
"A list of global capes to be available at all times.
Expand All @@ -28,7 +28,7 @@ placed, otherwise they come first."
`+cape-global-capes'."
:group 'minemacs-completion
:type '(repeat function))
:config
:init
;; Silence the pcomplete capf, no errors or messages! Important for corfu!
(advice-add 'pcomplete-completions-at-point :around #'cape-wrap-silent)

Expand All @@ -45,7 +45,7 @@ placed, otherwise they come first."

(+add-hook! (TeX-mode LaTeX-mode)
(add-hook 'completion-at-point-functions #'cape-tex nil t))

:config
;; Make use of `cape''s super Capf functionality. Adapted from:
;; git.sr.ht/~gagbo/doom-config/tree/master/item/modules/completion/corfu/config.el
(defun +cape-apply-capf-super ()
Expand Down Expand Up @@ -135,8 +135,7 @@ This depends on `+cape-hosts' and `+cape-global-capes'."
(use-package nerd-icons-corfu
:straight t
:after corfu
:demand t
:config
:init
(add-to-list 'corfu-margin-formatters #'nerd-icons-corfu-formatter))

(use-package consult
Expand Down Expand Up @@ -251,8 +250,6 @@ This depends on `+cape-hosts' and `+cape-global-capes'."

(use-package orderless
:straight t
:after minemacs-loaded
:demand t
:custom
(completion-styles '(orderless basic))
(completion-category-overrides '((file (styles basic partial-completion)))))
Expand All @@ -275,7 +272,6 @@ This depends on `+cape-hosts' and `+cape-global-capes'."

(use-package vertico-directory
:after vertico
:demand t
:hook (rfn-eshadow-update-overlay . vertico-directory-tidy)
:bind (:map vertico-map
("RET" . vertico-directory-enter)
Expand Down

0 comments on commit 0fbf888

Please sign in to comment.