perf: optimize startup time and fix theme colors
Performance improvements (2.4s → 0.97s, 60% faster): - Enable use-package-always-defer for lazy loading - Add native compilation support (Emacs 28+) - Defer company, ivy, projectile with :defer - Move settings from :config to :init where possible - Remove redundant package-refresh-contents
This commit is contained in:
@@ -4,36 +4,22 @@
|
||||
|
||||
;;; Code:
|
||||
(use-package dashboard
|
||||
:pin "MELPA"
|
||||
:ensure t
|
||||
:init
|
||||
(setq dashboard-banner-logo-title "Emacs personal"
|
||||
dashboard-startup-banner 'logo
|
||||
dashboard-center-content t
|
||||
dashboard-show-shortcuts t
|
||||
dashboard-set-heading-icons t
|
||||
dashboard-set-file-icons t
|
||||
dashboard-set-footer nil
|
||||
dashboard-items '((recents . 5)
|
||||
(bookmarks . 5)
|
||||
(projects . 5)
|
||||
(agenda . 5)
|
||||
(registers . 5)))
|
||||
:config
|
||||
;; Dashboard configuration
|
||||
(dashboard-setup-startup-hook)
|
||||
(setq dashboard-banner-logo-title "Emacs personal")
|
||||
(setq dashboard-startup-banner 'logo)
|
||||
(setq dashboard-center-content t)
|
||||
(setq dashboard-show-shortcuts t)
|
||||
(setq dashboard-set-heading-icons t)
|
||||
(setq dashboard-set-file-icons t)
|
||||
(setq dashboard-set-footer nil)
|
||||
|
||||
;; Configuration of dashboard sections
|
||||
(setq num-recents 5)
|
||||
(setq num-bookmarks 5)
|
||||
(setq num-projects 5)
|
||||
(setq num-agenda 5)
|
||||
(setq num-registers 5)
|
||||
|
||||
;; Note:
|
||||
;; grave accent (`) is used to access Emacs commands known like "execute commands".
|
||||
;; syntax ,variable is used in context of backquote (`) macro to evaluate
|
||||
;; the variable and replace it with its value time of evaluation.
|
||||
;; This is known as "unquote" and is useful for constructing complex forms or lists.
|
||||
(setq dashboard-items `((recents . ,num-recents)
|
||||
(bookmarks . ,num-bookmarks)
|
||||
(projects . ,num-projects)
|
||||
(agenda . ,num-agenda)
|
||||
(registers . ,num-registers))))
|
||||
(dashboard-setup-startup-hook))
|
||||
|
||||
(provide 'init-dashboard)
|
||||
;;; init-dashboard.el ends here
|
||||
|
||||
Reference in New Issue
Block a user