update
This commit is contained in:
@@ -1,8 +1,27 @@
|
||||
(setq gc-cons-threshold 100000000)
|
||||
(setq read-process-output-max (* 1024 1024 4))
|
||||
|
||||
(defvar bootstrap-version)
|
||||
(let ((bootstrap-file
|
||||
(expand-file-name
|
||||
"straight/repos/straight.el/bootstrap.el"
|
||||
(or (bound-and-true-p straight-base-dir)
|
||||
user-emacs-directory)))
|
||||
(bootstrap-version 7))
|
||||
(unless (file-exists-p bootstrap-file)
|
||||
(with-current-buffer
|
||||
(url-retrieve-synchronously
|
||||
"https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
|
||||
'silent 'inhibit-cookies)
|
||||
(goto-char (point-max))
|
||||
(eval-print-last-sexp)))
|
||||
(load bootstrap-file nil 'nomessage))
|
||||
|
||||
(straight-use-package 'use-package)
|
||||
(setq straight-use-package-by-default t)
|
||||
|
||||
(use-package emacs
|
||||
:ensure nil
|
||||
:straight (:type built-in)
|
||||
:custom ;; Set custom variables to configure Emacs behavior.
|
||||
(auto-save-default nil) ;; Disable automatic saving of buffers.
|
||||
(column-number-mode t) ;; Display the column number in the mode line.
|
||||
@@ -59,14 +78,14 @@
|
||||
(modify-coding-system-alist 'file "" 'utf-8))
|
||||
|
||||
(use-package dired
|
||||
:ensure nil ;; This is built-in, no need to fetch it.
|
||||
:straight (:type built-in) ;; This is built-in, no need to fetch it.
|
||||
:custom
|
||||
(dired-listing-switches "-lah --group-directories-first") ;; Display files in a human-readable format and group directories first.
|
||||
(dired-dwim-target t) ;; Enable "do what I mean" for target directories.
|
||||
(dired-kill-when-opening-new-dired-buffer t)) ;; Close the previous buffer when opening a new `dired' instance.
|
||||
|
||||
(use-package eldoc
|
||||
:ensure nil ;; This is built-in, no need to fetch it.
|
||||
:straight (:type built-in) ;; This is built-in, no need to fetch it.
|
||||
:config
|
||||
(setq eldoc-idle-delay 0) ;; Automatically fetch doc help
|
||||
(setq eldoc-echo-area-use-multiline-p nil) ;; We use the "K" floating help instead
|
||||
@@ -76,7 +95,7 @@
|
||||
(global-eldoc-mode))
|
||||
|
||||
(use-package flymake
|
||||
:ensure nil ;; This is built-in, no need to fetch it.
|
||||
:straight (:type built-in) ;; This is built-in, no need to fetch it.
|
||||
:defer t
|
||||
:hook (prog-mode . flymake-mode)
|
||||
:custom
|
||||
@@ -84,13 +103,12 @@
|
||||
'((error "!»" compilation-error) (warning "»" compilation-warning) (note "»" compilation-info))))
|
||||
|
||||
(use-package which-key
|
||||
:ensure nil ;; This is built-in, no need to fetch it.
|
||||
:straight (:type built-in) ;; This is built-in, no need to fetch it.
|
||||
:defer t ;; Defer loading Which-Key until after init.
|
||||
:hook
|
||||
(after-init . which-key-mode)) ;; Enable which-key mode after initialization.
|
||||
|
||||
(use-package vertico
|
||||
:ensure t
|
||||
:hook
|
||||
(after-init . vertico-mode) ;; Enable vertico after Emacs has initialized.
|
||||
:custom
|
||||
@@ -99,7 +117,6 @@
|
||||
(vertico-cycle nil)) ;; Do not cycle through candidates when reaching the end of the list.
|
||||
|
||||
(use-package orderless
|
||||
:ensure t
|
||||
:defer t ;; Load Orderless on demand.
|
||||
:after vertico ;; Ensure Vertico is loaded before Orderless.
|
||||
:init
|
||||
@@ -108,12 +125,10 @@
|
||||
completion-category-overrides '((file (styles partial-completion))))) ;; Customize file completion styles.
|
||||
|
||||
(use-package marginalia
|
||||
:ensure t
|
||||
:hook
|
||||
(after-init . marginalia-mode))
|
||||
|
||||
(use-package consult
|
||||
:ensure t
|
||||
:defer t
|
||||
:init
|
||||
;; Enhance register preview with thin lines and no mode line.
|
||||
@@ -124,23 +139,19 @@
|
||||
xref-show-definitions-function #'consult-xref))
|
||||
|
||||
(use-package embark
|
||||
:ensure t
|
||||
:defer t)
|
||||
|
||||
(use-package embark-consult
|
||||
:ensure t
|
||||
:hook
|
||||
(embark-collect-mode . consult-preview-at-point-mode)) ;; Enable preview in Embark collect mode.
|
||||
|
||||
(use-package treesit-auto
|
||||
:ensure t
|
||||
:after emacs
|
||||
:config
|
||||
(treesit-auto-add-to-auto-mode-alist 'all)
|
||||
(global-treesit-auto-mode t))
|
||||
|
||||
(use-package corfu
|
||||
:ensure t
|
||||
:defer t
|
||||
:custom
|
||||
(corfu-auto t) ;; Only completes when hitting TAB
|
||||
@@ -153,13 +164,11 @@
|
||||
(corfu-popupinfo-delay 0.5) ;; Delay before showing documentation popup
|
||||
:config
|
||||
(add-to-list 'corfu-margin-formatters #'nerd-icons-corfu-formatter)
|
||||
:init
|
||||
(global-corfu-mode)
|
||||
(corfu-popupinfo-mode t))
|
||||
|
||||
|
||||
(use-package nerd-icons-corfu
|
||||
:ensure t
|
||||
:defer t
|
||||
:after (:all corfu))
|
||||
|
||||
@@ -196,7 +205,6 @@
|
||||
(advice-add 'lsp-resolve-final-command :around #'lsp-booster--advice-final-command)
|
||||
|
||||
(use-package lsp-mode
|
||||
:ensure t
|
||||
:defer t
|
||||
:hook (;; Replace XXX-mode with concrete major mode (e.g. python-mode)
|
||||
(lsp-mode . lsp-enable-which-key-integration) ;; Integrate with Which Key
|
||||
@@ -254,16 +262,13 @@
|
||||
(add-to-list 'lsp-file-watch-ignored-directories "[/\\\\]\\node_modules\\'"))
|
||||
|
||||
(use-package nix-ts-mode
|
||||
:ensure t
|
||||
:mode "\\.nix\\'")
|
||||
|
||||
(use-package eldoc-box
|
||||
:ensure t
|
||||
:defer t)
|
||||
|
||||
(use-package diff-hl
|
||||
:defer t
|
||||
:ensure t
|
||||
:hook
|
||||
(find-file . (lambda ()
|
||||
(global-diff-hl-mode) ;; Enable Diff-HL mode for all files.
|
||||
@@ -273,13 +278,11 @@
|
||||
(diff-hl-side 'left))
|
||||
|
||||
(use-package magit
|
||||
:ensure t
|
||||
:config
|
||||
(setopt magit-format-file-function #'magit-format-file-nerd-icons) ;; Turns on magit nerd-icons
|
||||
:defer t)
|
||||
|
||||
(use-package evil
|
||||
:ensure t
|
||||
:defer t
|
||||
:hook
|
||||
(after-init . evil-mode)
|
||||
@@ -297,7 +300,6 @@
|
||||
|
||||
(use-package evil-collection
|
||||
:defer t
|
||||
:ensure t
|
||||
:custom
|
||||
(evil-collection-want-find-usages-bindings t)
|
||||
:hook
|
||||
@@ -305,20 +307,17 @@
|
||||
|
||||
|
||||
(use-package evil-surround
|
||||
:ensure t
|
||||
:after evil-collection
|
||||
:config
|
||||
(global-evil-surround-mode 1))
|
||||
|
||||
|
||||
(use-package evil-matchit
|
||||
:ensure t
|
||||
:after evil-collection
|
||||
:config
|
||||
(global-evil-matchit-mode 1))
|
||||
|
||||
(use-package general
|
||||
:ensure t
|
||||
:after (evil evil-collection)
|
||||
:init
|
||||
(setq general-override-states '(insert
|
||||
@@ -392,7 +391,6 @@
|
||||
|
||||
(use-package undo-tree
|
||||
:defer t
|
||||
:ensure t
|
||||
:hook
|
||||
(after-init . global-undo-tree-mode)
|
||||
:init
|
||||
@@ -405,11 +403,9 @@
|
||||
(setq undo-tree-history-directory-alist '(("." . "~/.config/emacs/.cache/undo"))))
|
||||
|
||||
(use-package dotenv-mode
|
||||
:defer t
|
||||
:ensure t)
|
||||
:defer t)
|
||||
|
||||
(use-package doom-modeline
|
||||
:ensure t
|
||||
:defer t
|
||||
:custom
|
||||
(doom-modeline-buffer-file-name-style 'buffer-name) ;; Set the buffer file name style to just the buffer name (without path).
|
||||
@@ -422,41 +418,35 @@
|
||||
(after-init . doom-modeline-mode))
|
||||
|
||||
(use-package nerd-icons
|
||||
:ensure t
|
||||
:defer t)
|
||||
|
||||
(use-package nerd-icons-dired
|
||||
:ensure t ;; Ensure the package is installed.
|
||||
:defer t ;; Load the package only when needed to improve startup time.
|
||||
:hook
|
||||
(dired-mode . nerd-icons-dired-mode))
|
||||
|
||||
(use-package nerd-icons-completion
|
||||
:ensure t ;; Ensure the package is installed.
|
||||
:after (:all nerd-icons marginalia) ;; Load after `nerd-icons' and `marginalia' to ensure proper integration.
|
||||
:config
|
||||
(nerd-icons-completion-mode) ;; Activate nerd icons for completion interfaces.
|
||||
(add-hook 'marginalia-mode-hook #'nerd-icons-completion-marginalia-setup)) ;; Setup icons in the marginalia mode for enhanced completion display.
|
||||
|
||||
(use-package exec-path-from-shell
|
||||
:ensure t
|
||||
:init
|
||||
:config
|
||||
(exec-path-from-shell-initialize))
|
||||
|
||||
(use-package envrc
|
||||
:ensure t
|
||||
:init
|
||||
(setq envrc-show-summary-in-minibuffer nil)
|
||||
:hook
|
||||
(after-init . envrc-global-mode))
|
||||
|
||||
(use-package modus-themes
|
||||
:ensure t
|
||||
:config
|
||||
(load-theme 'modus-vivendi t))
|
||||
|
||||
(use-package org
|
||||
:ensure nil
|
||||
:straight (:type built-in)
|
||||
:defer t
|
||||
:custom
|
||||
(org-tags-column 0)
|
||||
@@ -496,7 +486,6 @@
|
||||
(require 'org-tempo))
|
||||
|
||||
(use-package org-roam
|
||||
:ensure t
|
||||
:custom
|
||||
(org-roam-directory "~/org")
|
||||
:bind (("C-c n l" . org-roam-buffer-toggle)
|
||||
|
||||
Reference in New Issue
Block a user