init.el 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. ;;; init.el -*- lexical-binding: t; -*-
  2. ;;elpaca
  3. (defvar elpaca-installer-version 0.12)
  4. (defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
  5. (defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
  6. (defvar elpaca-sources-directory (expand-file-name "sources/" elpaca-directory))
  7. (defvar elpaca-order '(elpaca :repo "https://github.com/progfolio/elpaca.git"
  8. :ref nil :depth 1 :inherit ignore
  9. :files (:defaults "elpaca-test.el" (:exclude "extensions"))
  10. :build (:not elpaca-activate)))
  11. (let* ((repo (expand-file-name "elpaca/" elpaca-sources-directory))
  12. (build (expand-file-name "elpaca/" elpaca-builds-directory))
  13. (order (cdr elpaca-order))
  14. (default-directory repo))
  15. (add-to-list 'load-path (if (file-exists-p build) build repo))
  16. (unless (file-exists-p repo)
  17. (make-directory repo t)
  18. (when (<= emacs-major-version 28) (require 'subr-x))
  19. (condition-case-unless-debug err
  20. (if-let* ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*"))
  21. ((zerop (apply #'call-process `("git" nil ,buffer t "clone"
  22. ,@(when-let* ((depth (plist-get order :depth)))
  23. (list (format "--depth=%d" depth) "--no-single-branch"))
  24. ,(plist-get order :repo) ,repo))))
  25. ((zerop (call-process "git" nil buffer t "checkout"
  26. (or (plist-get order :ref) "--"))))
  27. (emacs (concat invocation-directory invocation-name))
  28. ((zerop (call-process emacs nil buffer nil "-Q" "-L" "." "--batch"
  29. "--eval" "(byte-recompile-directory \".\" 0 'force)")))
  30. ((require 'elpaca))
  31. ((elpaca-generate-autoloads "elpaca" repo)))
  32. (progn (message "%s" (buffer-string)) (kill-buffer buffer))
  33. (error "%s" (with-current-buffer buffer (buffer-string))))
  34. ((error) (warn "%s" err) (delete-directory repo 'recursive))))
  35. (unless (require 'elpaca-autoloads nil t)
  36. (require 'elpaca)
  37. (elpaca-generate-autoloads "elpaca" repo)
  38. (let ((load-source-file-function nil)) (load "./elpaca-autoloads"))))
  39. (add-hook 'after-init-hook #'elpaca-process-queues)
  40. (elpaca `(,@elpaca-order))
  41. ;;(elpaca-wait)
  42. (elpaca benchmark-init)
  43. (elpaca-wait)
  44. (benchmark-init/activate)
  45. ;; emacs 30 fix
  46. ;;(add-to-list 'elpaca-ignored-dependencies 'compat)
  47. ;; ==============================================================================
  48. ;; CORE UI & INTERFACE
  49. ;; ==============================================================================
  50. (elpaca compat)
  51. (elpaca general) ;Keybindings
  52. (elpaca vertico) ;Vertical completion
  53. (elpaca orderless) ;Filtering for Consult/Vertico
  54. (elpaca marginalia) ;Annotations in the minibuffer
  55. (elpaca corfu) ;In-buffer completion
  56. (elpaca corfu-terminal) ;necessary for popup on emacs <31
  57. (elpaca-wait) ;Ensure UI is ready before loading tools
  58. (elpaca nerd-icons)
  59. (elpaca nerd-icons-completion)
  60. (elpaca nerd-icons-dired)
  61. (elpaca nerd-icons-corfu)
  62. (elpaca doom-modeline)
  63. (elpaca base16-theme)
  64. ;; ==============================================================================
  65. ;; EDITING & NAVIGATION
  66. ;; ==============================================================================
  67. (elpaca meow) ; Modal editing
  68. (elpaca avy) ; Fast jumping
  69. (elpaca smartparens)
  70. ;;(elpaca expand-region) ; replaced by expreg
  71. (elpaca expreg) ;expand selection
  72. (elpaca undo-fu)
  73. (elpaca vundo) ; Visual undo tree
  74. (elpaca xclip)
  75. (elpaca clipetty)
  76. (elpaca embark) ; Contextual actions
  77. (elpaca embark-consult)
  78. (elpaca lsp-embark)
  79. (elpaca kirigami) ; Selection/Editing
  80. (elpaca jinx) ; Fast duplicate lines
  81. ;; ==============================================================================
  82. ;; CODE ANALYSIS & VISUALS
  83. ;; ==============================================================================
  84. (elpaca treesit-auto)
  85. (elpaca treesit-fold)
  86. (elpaca highlight-quoted)
  87. (elpaca highlight-defined)
  88. (elpaca color-identifiers-mode)
  89. (elpaca rainbow-delimiters)
  90. (elpaca indent-bars)
  91. (elpaca outline-indent)
  92. ;; ==============================================================================
  93. ;; LSP & DEVELOPMENT
  94. ;; ==============================================================================
  95. (elpaca mason) ; LSP server manager
  96. (elpaca lsp-mode)
  97. (elpaca lsp-ui)
  98. (elpaca consult-lsp)
  99. (elpaca flycheck)
  100. (elpaca yasnippet)
  101. (elpaca yasnippet-snippets)
  102. ;; ==============================================================================
  103. ;; LANGUAGE MODES
  104. ;; ==============================================================================
  105. (elpaca kdl-mode)
  106. (elpaca csv-mode)
  107. (elpaca arduino-mode)
  108. (elpaca nix-mode)
  109. ;; ==============================================================================
  110. ;; UTILITIES
  111. ;; ==============================================================================
  112. (elpaca consult) ; Enhanced search/navigation
  113. (elpaca vterm)
  114. (elpaca vterm-toggle)
  115. (elpaca colorful-mode)
  116. (elpaca (dirvish :repo "latiagertrutis/dirvish"
  117. :host github)) ; broken on emacs 30, fixed by using fork
  118. (elpaca transient)
  119. (elpaca magit)
  120. (elpaca transpose-frame)
  121. ;; ==============================================================================
  122. ;; KNOWLEDGE MANAGEMENT (ZK/DENOTE)
  123. ;; ==============================================================================
  124. (elpaca denote)
  125. (elpaca consult-denote)
  126. (elpaca denote-menu)
  127. (elpaca zk)
  128. (elpaca zk-index)
  129. ;; ==============================================================================
  130. ;; ELPACA CONFIGURATION
  131. ;; ==============================================================================
  132. (elpaca elpaca-use-package
  133. ;; Automatically adds :ensure t and :defer t to use-package declarations
  134. (elpaca-use-package-mode)
  135. (setq elpaca-use-package-by-default t))
  136. (load (expand-file-name "config.el" user-emacs-directory))
  137. (custom-set-variables
  138. ;; custom-set-variables was added by Custom.
  139. ;; If you edit it by hand, you could mess it up, so be careful.
  140. ;; Your init file should contain only one such instance.
  141. ;; If there is more than one, they won't work right.
  142. '(custom-safe-themes
  143. '("c9afaac8aedf1bb721d21053a79a65969fd8f44314d22ff29c8981709ee4245f"
  144. "0672d7fbe7fa24344bbe98461a8db26cb52a074354f9a4529cea4ba1af456044"
  145. "664111db1521fe3351061dc87aea95fa98b3f244f4b830fbc048d39c3a8bc125"
  146. "df7b90a88131500ce9e5a911c815ce96eb7855d88747830f298c6914d80be48e"
  147. "4fa3b7b09062f707a4770804dda9dda4807aa5c86623076b9741897df2e7acdd"
  148. "5bfc7c010e3ee71396e421c2e8a5a561c305da812eba9e0e48742896d8e45d97"
  149. "48cebeaf733cae05b5265eceafea44c042f2fc65906ccd999f652d230be25b6f"
  150. "1b4f5bebc7f47257997a8d56e797e2e8d85581bbd824a275bb1ebc7aea7c1399"
  151. "a7dab7ccf5c97be13a1d957e8847cfda7cf768554595429a43f6b6393459c45e"
  152. "ca223796522e77b1813111ad2994b8e579df1000d1e3c34b604fe0a18ad45dec"
  153. default)))
  154. (custom-set-faces
  155. ;; custom-set-faces was added by Custom.
  156. ;; If you edit it by hand, you could mess it up, so be careful.
  157. ;; Your init file should contain only one such instance.
  158. ;; If there is more than one, they won't work right.
  159. '(meow-insert-cursor ((t (:inherit unspecified :background "#c75e10"))))
  160. '(meow-normal-cursor ((t (:foreground "#7cc9f2" :background "#f8f8ff")))))