perf: optimize startup time and fix theme colors
All checks were successful
git-sync-with-mirror / test (push) Successful in 3m5s
git-sync-with-mirror / git-sync (push) Successful in 14s

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:
2026-02-28 00:39:33 -05:00
parent 1aedc8d100
commit 47333c1f4f
9 changed files with 96 additions and 95 deletions

View File

@@ -4,19 +4,20 @@
;;; Code:
(use-package company
:defer 5
:defer 0.5
:diminish
:bind
(:map company-mode-map
("<backtab>" . company-complete))
:config
;; Global
(setq company-idle-delay 1
company-minimum-prefix-length 1
:init
(setq company-idle-delay 0.3
company-minimum-prefix-length 2
company-show-numbers nil
company-tooltip-limit 20)
;; Facing
company-tooltip-limit 15
company-dabbrev-ignore-case t
company-dabbrev-downcase nil)
:config
;; Face customization
(unless (face-attribute 'company-tooltip :background)
(set-face-attribute 'company-tooltip nil :background "black" :foreground "gray40")
(set-face-attribute 'company-tooltip-selection nil :inherit 'company-tooltip :background "gray15")
@@ -24,8 +25,6 @@
(set-face-attribute 'company-preview-common nil :inherit 'company-preview :foreground "gray40")
(set-face-attribute 'company-scrollbar-bg nil :inherit 'company-tooltip :background "gray20")
(set-face-attribute 'company-scrollbar-fg nil :background "gray40"))
;; Activating globally
(global-company-mode t))
(use-package company-quickhelp