178 lines
7.6 KiB
EmacsLisp
178 lines
7.6 KiB
EmacsLisp
;;; init.el -*- lexical-binding: t; -*-
|
|
;;elpaca
|
|
(defvar elpaca-installer-version 0.12)
|
|
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
|
|
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
|
|
(defvar elpaca-sources-directory (expand-file-name "sources/" elpaca-directory))
|
|
(defvar elpaca-order '(elpaca :repo "https://github.com/progfolio/elpaca.git"
|
|
:ref nil :depth 1 :inherit ignore
|
|
:files (:defaults "elpaca-test.el" (:exclude "extensions"))
|
|
:build (:not elpaca-activate)))
|
|
(let* ((repo (expand-file-name "elpaca/" elpaca-sources-directory))
|
|
(build (expand-file-name "elpaca/" elpaca-builds-directory))
|
|
(order (cdr elpaca-order))
|
|
(default-directory repo))
|
|
(add-to-list 'load-path (if (file-exists-p build) build repo))
|
|
(unless (file-exists-p repo)
|
|
(make-directory repo t)
|
|
(when (<= emacs-major-version 28) (require 'subr-x))
|
|
(condition-case-unless-debug err
|
|
(if-let* ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*"))
|
|
((zerop (apply #'call-process `("git" nil ,buffer t "clone"
|
|
,@(when-let* ((depth (plist-get order :depth)))
|
|
(list (format "--depth=%d" depth) "--no-single-branch"))
|
|
,(plist-get order :repo) ,repo))))
|
|
((zerop (call-process "git" nil buffer t "checkout"
|
|
(or (plist-get order :ref) "--"))))
|
|
(emacs (concat invocation-directory invocation-name))
|
|
((zerop (call-process emacs nil buffer nil "-Q" "-L" "." "--batch"
|
|
"--eval" "(byte-recompile-directory \".\" 0 'force)")))
|
|
((require 'elpaca))
|
|
((elpaca-generate-autoloads "elpaca" repo)))
|
|
(progn (message "%s" (buffer-string)) (kill-buffer buffer))
|
|
(error "%s" (with-current-buffer buffer (buffer-string))))
|
|
((error) (warn "%s" err) (delete-directory repo 'recursive))))
|
|
(unless (require 'elpaca-autoloads nil t)
|
|
(require 'elpaca)
|
|
(elpaca-generate-autoloads "elpaca" repo)
|
|
(let ((load-source-file-function nil)) (load "./elpaca-autoloads"))))
|
|
(add-hook 'after-init-hook #'elpaca-process-queues)
|
|
(elpaca `(,@elpaca-order))
|
|
;;(elpaca-wait)
|
|
(elpaca benchmark-init)
|
|
(elpaca-wait)
|
|
|
|
(benchmark-init/activate)
|
|
|
|
;; emacs 30 fix
|
|
;;(add-to-list 'elpaca-ignored-dependencies 'compat)
|
|
|
|
;; ==============================================================================
|
|
;; CORE UI & INTERFACE
|
|
;; ==============================================================================
|
|
|
|
(elpaca compat)
|
|
(elpaca general) ;Keybindings
|
|
(elpaca vertico) ;Vertical completion
|
|
(elpaca orderless) ;Filtering for Consult/Vertico
|
|
(elpaca marginalia) ;Annotations in the minibuffer
|
|
(elpaca corfu) ;In-buffer completion
|
|
(elpaca corfu-terminal) ;necessary for popup on emacs <31
|
|
(elpaca-wait) ;Ensure UI is ready before loading tools
|
|
(elpaca nerd-icons)
|
|
(elpaca nerd-icons-completion)
|
|
(elpaca nerd-icons-dired)
|
|
(elpaca nerd-icons-corfu)
|
|
(elpaca doom-modeline)
|
|
(elpaca base16-theme)
|
|
|
|
;; ==============================================================================
|
|
;; EDITING & NAVIGATION
|
|
;; ==============================================================================
|
|
|
|
(elpaca meow) ; Modal editing
|
|
(elpaca avy) ; Fast jumping
|
|
(elpaca smartparens)
|
|
;;(elpaca expand-region) ; replaced by expreg
|
|
(elpaca expreg) ;expand selection
|
|
(elpaca undo-fu)
|
|
(elpaca vundo) ; Visual undo tree
|
|
(elpaca xclip)
|
|
(elpaca clipetty)
|
|
(elpaca embark) ; Contextual actions
|
|
(elpaca embark-consult)
|
|
(elpaca lsp-embark)
|
|
(elpaca kirigami) ; Selection/Editing
|
|
(elpaca jinx) ; Fast duplicate lines
|
|
|
|
;; ==============================================================================
|
|
;; CODE ANALYSIS & VISUALS
|
|
;; ==============================================================================
|
|
|
|
(elpaca treesit-auto)
|
|
(elpaca treesit-fold)
|
|
(elpaca highlight-quoted)
|
|
(elpaca highlight-defined)
|
|
(elpaca color-identifiers-mode)
|
|
(elpaca rainbow-delimiters)
|
|
(elpaca indent-bars)
|
|
(elpaca outline-indent)
|
|
|
|
;; ==============================================================================
|
|
;; LSP & DEVELOPMENT
|
|
;; ==============================================================================
|
|
|
|
(elpaca mason) ; LSP server manager
|
|
(elpaca lsp-mode)
|
|
(elpaca lsp-ui)
|
|
(elpaca consult-lsp)
|
|
(elpaca flycheck)
|
|
(elpaca yasnippet)
|
|
(elpaca yasnippet-snippets)
|
|
|
|
;; ==============================================================================
|
|
;; LANGUAGE MODES
|
|
;; ==============================================================================
|
|
|
|
(elpaca kdl-mode)
|
|
(elpaca csv-mode)
|
|
(elpaca arduino-mode)
|
|
(elpaca nix-mode)
|
|
;; ==============================================================================
|
|
;; UTILITIES
|
|
;; ==============================================================================
|
|
|
|
(elpaca consult) ; Enhanced search/navigation
|
|
(elpaca vterm)
|
|
(elpaca vterm-toggle)
|
|
(elpaca colorful-mode)
|
|
(elpaca (dirvish :repo "latiagertrutis/dirvish"
|
|
:host github)) ; broken on emacs 30, fixed by using fork
|
|
(elpaca transient)
|
|
(elpaca magit)
|
|
(elpaca transpose-frame)
|
|
;; ==============================================================================
|
|
;; KNOWLEDGE MANAGEMENT (ZK/DENOTE)
|
|
;; ==============================================================================
|
|
|
|
(elpaca denote)
|
|
(elpaca consult-denote)
|
|
(elpaca denote-menu)
|
|
(elpaca zk)
|
|
(elpaca zk-index)
|
|
|
|
;; ==============================================================================
|
|
;; ELPACA CONFIGURATION
|
|
;; ==============================================================================
|
|
|
|
(elpaca elpaca-use-package
|
|
;; Automatically adds :ensure t and :defer t to use-package declarations
|
|
(elpaca-use-package-mode)
|
|
(setq elpaca-use-package-by-default t))
|
|
|
|
(load (expand-file-name "config.el" user-emacs-directory))
|
|
(custom-set-variables
|
|
;; custom-set-variables was added by Custom.
|
|
;; If you edit it by hand, you could mess it up, so be careful.
|
|
;; Your init file should contain only one such instance.
|
|
;; If there is more than one, they won't work right.
|
|
'(custom-safe-themes
|
|
'("c9afaac8aedf1bb721d21053a79a65969fd8f44314d22ff29c8981709ee4245f"
|
|
"0672d7fbe7fa24344bbe98461a8db26cb52a074354f9a4529cea4ba1af456044"
|
|
"664111db1521fe3351061dc87aea95fa98b3f244f4b830fbc048d39c3a8bc125"
|
|
"df7b90a88131500ce9e5a911c815ce96eb7855d88747830f298c6914d80be48e"
|
|
"4fa3b7b09062f707a4770804dda9dda4807aa5c86623076b9741897df2e7acdd"
|
|
"5bfc7c010e3ee71396e421c2e8a5a561c305da812eba9e0e48742896d8e45d97"
|
|
"48cebeaf733cae05b5265eceafea44c042f2fc65906ccd999f652d230be25b6f"
|
|
"1b4f5bebc7f47257997a8d56e797e2e8d85581bbd824a275bb1ebc7aea7c1399"
|
|
"a7dab7ccf5c97be13a1d957e8847cfda7cf768554595429a43f6b6393459c45e"
|
|
"ca223796522e77b1813111ad2994b8e579df1000d1e3c34b604fe0a18ad45dec"
|
|
default)))
|
|
(custom-set-faces
|
|
;; custom-set-faces was added by Custom.
|
|
;; If you edit it by hand, you could mess it up, so be careful.
|
|
;; Your init file should contain only one such instance.
|
|
;; If there is more than one, they won't work right.
|
|
'(meow-insert-cursor ((t (:inherit unspecified :background "#c75e10"))))
|
|
'(meow-normal-cursor ((t (:foreground "#7cc9f2" :background "#f8f8ff")))))
|