;;; 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 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 minibuffer (elpaca vertico-posframe) ;hover (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 ; codeberg not cooperating. ;;(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) ;; ============================================================================== ;; EDITING & NAVIGATION ;; ============================================================================== ;;(elpaca meow) ; Modal editing (elpaca god-mode) ; psuedo modal editing (elpaca multiple-cursors) (elpaca avy) ; Fast jumping (elpaca surround) ; utilties around surround selection (elpaca expreg) ; expand selection (elpaca undo-fu) (elpaca vundo) ; Visual undo tree (elpaca xclip) (elpaca clipetty) ; clipboard stuff TUI-GUI-Wayland (elpaca embark) ; Contextual actions (elpaca embark-consult) (elpaca wgrep) ; allow writeable grep buffers (elpaca drag-stuff) ;(elpaca lsp-embark) (elpaca kirigami) ; folding meta utility (elpaca pcre2el) ; fix regex ;; ============================================================================== ;; CODE ANALYSIS & VISUALS ;; ============================================================================== (elpaca treesit-fold) ; folding based on treesit (elpaca highlight-quoted) ; emacs (elpaca highlight-defined) ; emacs (elpaca color-identifiers-mode) ; emacs (elpaca highlight-parentheses) ; delimiters around point (elpaca rainbow-delimiters) ; rainbow colours for pairs (elpaca outline-indent) ; (elpaca (svg-margin :repo "chiply/svg-margin" :host github)) ;; ============================================================================== ;; LSP & DEVELOPMENT ;; ============================================================================== (elpaca mason) ; LSP server manager (elpaca lsp-mode) (elpaca lsp-ui) (elpaca flycheck) (elpaca consult-lsp) (elpaca consult-flycheck) (elpaca yasnippet) (elpaca yasnippet-snippets) ;; ============================================================================== ;; LANGUAGE MODES ;; ============================================================================== (elpaca kdl-mode) (elpaca csv-mode) (elpaca arduino-mode) (elpaca nix-mode) (elpaca web-mode) ;; ============================================================================== ;; UTILITIES ;; ============================================================================== (elpaca consult) ; Enhanced search/navigation (elpaca ghostel) ; terminal (elpaca shell-pop) (elpaca colorful-mode) ; colourise color codes (elpaca (dirvish :repo "latiagertrutis/dirvish" :host github)) ; broken on emacs 30, fixed by using fork (elpaca (dired-clipboard :repo "kn66/dired-clipboard.el" ;system clipboard in dired :host github)) (elpaca transient) ; bindings in modes (elpaca magit) ; git client (elpaca transpose-frame) ; edit frame layout (elpaca jit-spell) ; spellcheck (elpaca sudo-edit) ; sudo util ;; ============================================================================== ;; KNOWLEDGE MANAGEMENT (ZK/DENOTE) ;; ============================================================================== (elpaca denote) (elpaca consult-denote) (elpaca denote-menu) ;; ============================================================================== ;; 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 '())) (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. ) (setq minimal-emacs--success t) (setq initial-major-mode 'fundamental-mode initial-scratch-message nil)