My personal emacs configuration

Try out a multi-file emacs configuration

+526 -229
+76
early-init.el
··· 1 + ;;; early-init -- Early emacs initialization 2 + ;;; Commentary: 3 + ;;; Code: 4 + 5 + (defvar nesv/tiling-window-manager-regexp "bspwm\\|herbstluftwm\\|i3\\|hyprland" 6 + "Regexp to match the name of tiling window managers.") 7 + 8 + (defmacro nesv/with-desktop-session (&rest body) 9 + "Expand BODY if desktop is *not* a tiling window manager." 10 + (declare (indent 0)) 11 + `(when-let ((session (getenv "DESKTOP_SESSION")) 12 + ((not (string-match-p session nesv/tiling-window-manager-regexp)))) 13 + ,@body)) 14 + 15 + (defun nesv/add-to-list (list element) 16 + "Add ELEMENT to LIST. A simplified version of ADD-TO-LIST." 17 + (set list (cons element (symbol-value list)))) 18 + 19 + ;; Set the window size on non-tiling window managers. 20 + ;; 21 + ;; INITIAL-FRAME-ALIST is the first frame that is produced when starting emacs. 22 + ;; DEFAULT-FRAME-ALIST is all other frames. 23 + (nesv/with-desktop-session 24 + (mapc 25 + (lambda (var) 26 + (nesv/add-to-list var '(width . (text-pixels . 800))) 27 + (nesv/add-to-list var '(height . (text-pixels . 900))) 28 + (nesv/add-to-list var '(scroll-bar-width . 10))) 29 + '(default-frame-alist initial-frame-alist))) 30 + 31 + (setq frame-resize-pixelwise t 32 + frame-inhibit-implied-resize t 33 + frame-title-format '("%b") 34 + ring-bell-function 'ignore 35 + use-dialog-box t 36 + use-file-dialog nil 37 + use-short-answers t 38 + inhibit-splash-screen t 39 + inhibit-startup-screen t 40 + inhibit-x-resources t 41 + inhibit-startup-echo-area-message user-login-name 42 + inhibit-startup-buffer-menu t) 43 + 44 + ;; Disable useless graphical elements like the menu bar, the scroll bar, and 45 + ;; the tool bar. 46 + (menu-bar-mode -1) 47 + (scroll-bar-mode -1) 48 + (tool-bar-mode -1) 49 + 50 + ;; Temporarily increase the garbage collection threshold. 51 + ;; This should shave about 0.5s off startup time. 52 + (setq gc-cons-threshold most-positive-fixnum 53 + gc-cons-percentage 0.5) 54 + 55 + ;; More startup optimizations. 56 + (defvar nesv/file-name-handler-alist file-name-handler-alist) 57 + (defvar nesv/vc-handled-backends vc-handled-backends) 58 + 59 + (setq file-name-handler-alist nil 60 + vc-handled-backends nil) 61 + 62 + (add-hook 'emacs-startup-hook 63 + (lambda () 64 + (setq gc-cons-threshold (* 1000 1000 8) 65 + gc-cons-percentage 0.1 66 + file-name-handler-alist nesv/file-name-handler-alist 67 + vc-handled-backends nesv/vc-handled-backends))) 68 + 69 + ;; Name the default frame. 70 + (add-hook 'after-init-hook (lambda () (set-frame-name "nesv"))) 71 + 72 + ;; Inititalize install packages early. 73 + (setq package-enable-at-startup t) 74 + 75 + (provide 'early-init) 76 + ;;; early-init.el ends here
+92 -229
init.el
··· 2 2 ;;; Commentary: 3 3 ;;; Code: 4 4 5 + ;; Define a new group for customizations. 6 + ;; This will basically allow someone else to use this configuration, 7 + ;; but tweak it to their own liking by setting custom vars. 8 + (defgroup nesv-emacs nil 9 + "User options for nesv's Emacs. 10 + Put the customizations in a file called ~/.emacs.d/nesv-emacs-pre-custom.el." 11 + :group 'file) 12 + 13 + ;; Load extras for minibuffer completion. 14 + (defcustom nesv-emacs-completion-extras t 15 + "When non-nil, load extras for minibuffer completion (e.g. `consult', `embark')." 16 + :group 'nesv-emacs 17 + :type 'boolean) 18 + 19 + ;; User option to load extra stuff for tree-sitter. 20 + (defcustom nesv-emacs-tree-sitter-extras t 21 + "When non-nil, load extras for tree-sitter integration (e.g. `expreg')." 22 + :group 'nesv-emacs 23 + :type 'boolean) 24 + 25 + (defcustom nesv-emacs-load-which-key nil 26 + "When non-nil, display keybinding hints after a short delay." 27 + :group 'nesv-emacs 28 + :type 'boolean) 29 + 30 + (defcustom nesv-emacs-load-nerd-icons nil 31 + "When non-nil, enable nerd icons." 32 + :group 'nesv-emacs 33 + :type 'boolean) 34 + 35 + (defcustom nesv-emacs-load-theme 'ef 36 + "Load the specified colour theme." 37 + :group 'nesv-emacs 38 + :type '(choice :tag "Theme to load" :value ef 39 + (const :tag "`ef-themes'" ef) 40 + (const :tag "`modus-themes'" modus) 41 + (const :tag "Jonathan Blow style" naysayer) 42 + (const :tag "Do not load a theme" nil))) 43 + 44 + (defcustom nesv-emacs-font "Source Code Pro" 45 + "Set the specific font face when loading Emacs in GUI mode." 46 + :group 'nesv-emacs 47 + :type '(choice :tag "Font to use" :value "Source Code Pro" 48 + (const :tag "MonoLisa" "MonoLisa") 49 + (const :tag "Berkeley Mono" "Berkeley Mono"))) 50 + 5 51 ;; ░█▀█░█▀█░█▀▀░█░█░█▀█░█▀▀░█▀▀░█▀▀ 6 52 ;; ░█▀▀░█▀█░█░░░█▀▄░█▀█░█░█░█▀▀░▀▀█ 7 53 ;; ░▀░░░▀░▀░▀▀▀░▀░▀░▀░▀░▀▀▀░▀▀▀░▀▀▀ ··· 60 106 :config 61 107 (direnv-mode)) 62 108 63 - ;; ░█▀▀░█▀█░█░░░█▀█░█░█░█▀▄░░░▀█▀░█░█░█▀▀░█▄█░█▀▀░█▀▀ 64 - ;; ░█░░░█░█░█░░░█░█░█░█░█▀▄░░░░█░░█▀█░█▀▀░█░█░█▀▀░▀▀█ 65 - ;; ░▀▀▀░▀▀▀░▀▀▀░▀▀▀░▀▀▀░▀░▀░░░░▀░░▀░▀░▀▀▀░▀░▀░▀▀▀░▀▀▀ 66 - ;; A recreation of Jonathan Blow's emacs theme. 67 - (use-package naysayer-theme 68 - :ensure t) 69 - 70 - ;; EF-THEMES 71 - ;; 72 - ;; https://protesilaos.com/emacs/ef-themes 73 - (use-package ef-themes 74 - :ensure t) 75 - 76 - ;; MODUS THEMES 77 - ;; 78 - ;; https://protesilaos.com/emacs/modus-themes 79 - (use-package modus-themes 80 - :ensure t) 81 - 82 - (load-theme 'ef-bio t) 83 - 84 109 ;; ░█▀▀░█▀█░█░░░█▀█░▀█▀░█▀▄░█▀▀░░░░░█▄█░█▀█░█▀▄░█▀▀ 85 110 ;; ░▀▀█░█░█░█░░░█▀█░░█░░█▀▄░█▀▀░▄▄▄░█░█░█░█░█░█░█▀▀ 86 111 ;; ░▀▀▀░▀▀▀░▀▀▀░▀░▀░▀▀▀░▀░▀░▀▀▀░░░░░▀░▀░▀▀▀░▀▀░░▀▀▀ ··· 96 121 (menu-bar-mode -1) ; Disable the menubar. 97 122 (tool-bar-mode -1) ; Disable the toolbar. 98 123 (setq ring-bell-function 'ignore) ; Disable the damn bell. 99 - (setq make-backup-files nil) ; Do not create backup files. 100 124 (setq auto-save-default nil) ; Disable auto save. 101 125 (global-auto-revert-mode t) ; Auto-reload buffers when the backing file on disk changes. 102 126 (global-hl-line-mode t) ; Highlight the current line. ··· 104 128 (setq column-number-mode t) ; Display column numbers. 105 129 (set-default 'truncate-lines t) ; Let long lines flow off-screen. 106 130 131 + ;; Disable backup files, and lock files. 132 + (setq make-backup-files nil) 133 + (setq backup-inhibited nil) 134 + (setq create-lockfiles nil) 135 + 136 + ;; Silence native compilation (`nativecomp'). 137 + (when (native-comp-available-p) 138 + (setq native-comp-async-report-warnings-errors 'silent) 139 + (setq native-compile-prune-cache t)) 140 + 141 + ;; By default, Emacs writes persistent customizations to the end of the user's 142 + ;; init.el. 143 + ;; Disable it. 144 + (setq custom-file (make-temp-file "emacs-custom-")) 145 + 107 146 ;; Draw a ruler at the 80-character column. 108 147 (add-hook 'prog-mode-hook #'display-fill-column-indicator-mode) 109 148 (add-hook 'text-mode-hook #'display-fill-column-indicator-mode) ··· 112 151 (setq-default fill-column 80) 113 152 (add-hook 'text-mode-hook #'auto-fill-mode) 114 153 154 + ;; Enable these commands. 155 + (mapc 156 + (lambda (command) (put command 'disabled nil)) 157 + '(list-timers narrow-to-region narrow-to-page upcase-region downcase-region)) 158 + 159 + ;; Disable these commands. 160 + (mapc 161 + (lambda (command) (put command 'disabled t)) 162 + '(eshell project-eshell overwrite-mode iconify-frame diary)) 163 + 164 + ;; Always start with the *scratch* buffer. 165 + (setq initial-buffer-choice t) 166 + 115 167 ;; ░█▀▀░█░█░▀█▀░░░█▄█░█▀█░█▀▄░█▀▀ 116 168 ;; ░█░█░█░█░░█░░░░█░█░█░█░█░█░█▀▀ 117 169 ;; ░▀▀▀░▀▀▀░▀▀▀░░░▀░▀░▀▀▀░▀▀░░▀▀▀ ··· 123 175 (add-to-list 'default-frame-alist '(width . 120)) 124 176 (add-to-list 'default-frame-alist '(height . 60))) 125 177 126 - (use-package fontaine 127 - :ensure t 128 - :config 129 - (setq fontaine-presets 130 - '((tiny 131 - :default-family "Iosevka Comfy Wide Fixed" 132 - :default-height 70) 133 - (small 134 - :default-family "Iosevka Comfy Fixed" 135 - :default-height 90) 136 - (regular 137 - :default-height 100) 138 - (medium 139 - :default-height 110) 140 - (medium-large 141 - :default-height 120) 142 - (large 143 - :default-weight semilight 144 - :default-height 140 145 - :bold-weight extrabold) 146 - (presentation 147 - :default-weight semlight 148 - :default-height 170 149 - :bold-weight extrabold) 150 - (t 151 - :default-family "Iosevka Comfy Wide" 152 - :default-weight regular 153 - :default-height 100 154 - :fixed-pitch-family nil ; Falls back to :default-family 155 - :fixed-pitch-weight nil ; Falls back to :default-weight 156 - :fixed-pitch-height 1.0 157 - ;;:variable-pitch-family "Iosevka Comfy Wide Duo" 158 - :variable-pitch-family "Atkinson Hyperlegible" 159 - :variable-pitch-weight nil 160 - :variable-pitch-height 1.0 161 - :bold-family nil ; Whatever the underlying face has 162 - :bold-weight bold 163 - :italic-family nil 164 - :italic-slant italic 165 - :line-spacing nil))) 166 - (when (display-graphic-p) 167 - (fontaine-set-preset 'medium-large))) 178 + ;; By default, Emacs inserts tabs in place of multiple spaces when formatting 179 + ;; a region. 180 + ;; Turn this off. 181 + (setq-default indent-tabs-mode nil) 182 + 168 183 169 184 (use-package cursory 170 185 :ensure t ··· 210 225 (use-package nerd-icons 211 226 :ensure t) 212 227 213 - ;; ░█▀▀░█▀█░█▀█░▀█▀░░░█░░░▀█▀░█▀▀░█▀█░▀█▀░█░█░█▀▄░█▀▀░█▀▀ 214 - ;; ░█▀▀░█░█░█░█░░█░░░░█░░░░█░░█░█░█▀█░░█░░█░█░█▀▄░█▀▀░▀▀█ 215 - ;; ░▀░░░▀▀▀░▀░▀░░▀░░░░▀▀▀░▀▀▀░▀▀▀░▀░▀░░▀░░▀▀▀░▀░▀░▀▀▀░▀▀▀ 216 - ;; (setq-default mono-lisa-v2-ligatures '(;; coding ligatures 217 - ;; "<!---" "--->" "|||>" "<!--" "<|||" "<==>" "-->" "->>" "-<<" "..=" "!==" 218 - ;; "#_(" "/==" "||>" "||=" "|->" "===" "==>" "=>>" "=<<" "=/=" ">->" ">=>" 219 - ;; ">>-" ">>=" "<--" "<->" "<-<" "<||" "<|>" "<=" "<==" "<=>" "<=<" "<<-" 220 - ;; "<<=" "<~>" "<~~" "~~>" ">&-" "<&-" "&>>" "&>" "->" "-<" "-~" ".=" "!=" 221 - ;; "#_" "/=" "|=" "|>" "==" "=>" ">-" ">=" "<-" "<|" "<~" "~-" "~@" "~=" 222 - ;; "~>" "~~" 223 - ;; ;; whitespace ligatures 224 - ;; "---" "'''" "\"\"\"" "..." "..<" "{|" "[|" ".?" "::" ":::" "::=" ":=" 225 - ;; ":>" ":<" "\;\;" "!!" "!!." "!!!" "?." "?:" "??" "?=" "**" "***" "*>" 226 - ;; "*/" "--" "#:" "#!" "#?" "##" "###" "####" "#=" "/*" "/>" "//" "/**" 227 - ;; "///" "$(" ">&" "<&" "&&" "|}" "|]" "$>" ".." "++" "+++" "+>" "=:=" 228 - ;; "=!=" ">:" ">>" ">>>" "<:" "<*" "<*>" "<$" "<$>" "<+" "<+>" "<>" "<<" 229 - ;; "<<<" "</" "</>" "^=" "%%") 230 - ;; berkeley-mono-ligatures '(;; Group A 231 - ;; ".." ".=" "..." "..<" "::" ":::" ":=" "::=" ";;" ";;;" "??" "???" 232 - ;; ".?" "?." ":?" "?:" "?=" "**" "***" "/*" "*/" "/**" 233 - ;; ;; Group B 234 - ;; "<-" "->" "-<" ">-" "<--" "-->" "<<-" "->>" "-<<" ">>-" "<-<" ">->" 235 - ;; "<-|" "|->" "-|" "|-" "||-" "<!--" "<#--" "<=" "=>" ">=" "<==" "==>" 236 - ;; "<<=" "=>>" "=<<" ">>=" "<=<" ">=>" "<=|" "|=>" "<=>" "<==>" "||=" 237 - ;; "|=" "//=" "/=" 238 - ;; ;; Group C 239 - ;; "<<" ">>" "<<<" ">>>" "<>" "<$" "$>" "<$>" "<+" "+>" "<+>" "<:" ":<" 240 - ;; "<:<" ">:" ":>" "<~" "~>" "<~>" "<<~" "<~~" "~~>" "~~" "<|" "|>" 241 - ;; "<|>" "<||" "||>" "<|||" "|||>" "</" "/>" "</>" "<*" "*>" "<*>" ":?>" 242 - ;; ;; Group D 243 - ;; "#(" "#{" "#[" "]#" "#!" "#?" "#=" "#_" "#_(" "##" "###" "####" 244 - ;; ;; Group E 245 - ;; "[|" "|]" "[<" ">]" "{!!" "!!}" "{|" "|}" "{{" "}}" "{{--" "--}}" 246 - ;; "{!--" "//" "///" "!!" 247 - ;; ;; Group F 248 - ;; "www" "@_" "&&" "&&&" "&=" "~@" "++" "+++" "/\\" "\\/" "_|_" "||" 249 - ;; ;; Group G 250 - ;; "=:" "=:=" "=!=" "==" "===" "=/=" "=~" "~-" "^=" "__" "!=" "!==" "-~" 251 - ;; "--" "---")) 252 - 253 - ;; (when (display-graphic-p) 254 - ;; (use-package ligature 255 - ;; :ensure t 256 - ;; :config 257 - ;; (ligature-set-ligatures 'prog-mode mono-lisa-v2-ligatures) 258 - ;; (global-ligature-mode t))) 259 - 260 - ;; ░█▀▀░▀█▀░▀█▀░░░█░█▄█░█▀█░█▀▀░▀█▀░▀█▀ 261 - ;; ░█░█░░█░░░█░░▄▀░░█░█░█▀█░█░█░░█░░░█░ 262 - ;; ░▀▀▀░▀▀▀░░▀░░▀░░░▀░▀░▀░▀░▀▀▀░▀▀▀░░▀░ 263 - (use-package magit 264 - :ensure t 265 - :hook (after-save-hook . magit-after-save-refresh-status)) 266 - 267 - ;; Git Gutter -- Shows git status in the sidebar 268 - (use-package git-gutter 269 - :ensure t 270 - :hook (prog-mode . git-gutter-mode) 271 - :config 272 - (setq git-gutter:update-interval 0.2)) 273 - (use-package git-gutter-fringe 274 - :ensure t 275 - :config 276 - (define-fringe-bitmap 'git-gutter-fr:added [224] nil nil '(center repeated)) 277 - (define-fringe-bitmap 'git-gutter-fr:modified [224] nil nil '(center repeated)) 278 - (define-fringe-bitmap 'git-gutter-fr:deleted [128 192 224 240] nil nil 'bottom)) 279 - 280 - ;; ░▀█▀░█▀▄░█▀▀░█▀▀░░░░░█▀▀░▀█▀░▀█▀░▀█▀░█▀▀░█▀▄ 281 - ;; ░░█░░█▀▄░█▀▀░█▀▀░▄▄▄░▀▀█░░█░░░█░░░█░░█▀▀░█▀▄ 282 - ;; ░░▀░░▀░▀░▀▀▀░▀▀▀░░░░░▀▀▀░▀▀▀░░▀░░░▀░░▀▀▀░▀░▀ 283 - ;; ...because it's pretty cool. 284 - (use-package tree-sitter 285 - :ensure t) 286 - (use-package tree-sitter-langs 287 - :ensure t 288 - :hook (tree-sitter-after-on-hook . tree-sitter-hl-mode) 289 - :config 290 - (global-tree-sitter-mode)) 291 228 292 229 ;; indent-mode helps with indenting, moving around, and acting on 293 230 ;; whitespace-sensitive code, like YAML and Python. 294 231 (use-package indent-tools 295 232 :ensure t) 296 233 297 - ;; ░█░░░█▀█░█▀█░█▀▀░█░█░█▀█░█▀▀░█▀▀░█▀▀ 298 - ;; ░█░░░█▀█░█░█░█░█░█░█░█▀█░█░█░█▀▀░▀▀█ 299 - ;; ░▀▀▀░▀░▀░▀░▀░▀▀▀░▀▀▀░▀░▀░▀▀▀░▀▀▀░▀▀▀ 300 - (use-package adoc-mode 301 - :ensure t) 302 - 303 - ;; Bazel, Starlark, Tilt, etc. 304 - (use-package bazel :ensure t 305 - :mode ("Tiltfile.\\'" . bazel-mode)) 306 - 307 - ;; CUE -- https://cuelang.org 308 - (use-package cue-mode :ensure t) 309 - 310 - (use-package dockerfile-mode :ensure t) 311 - 312 - (use-package go-mode 313 - :ensure t 314 - :hook (before-save . gofmt-before-save)) 315 - 316 - ;; HashiCorp Configuration Language 317 - (use-package hcl-mode :ensure t) 318 - (use-package terraform-mode 319 - :ensure t 320 - :hook (terraform-mode . outline-minor-mode)) 321 - 322 - ;; Just -- https://just.systems 323 - (use-package just-mode :ensure t) 324 - 325 - (use-package markdown-mode 326 - :ensure t 327 - :mode ("README\\.md\\'" . gfm-mode) 328 - :hook (markdown-mode . auto-fill-mode) 329 - :init (setq markdown-command "multimarkdown")) 330 - 331 - (use-package protobuf-mode :ensure t) 332 - 333 - ;; (use-package rust-mode 334 - ;; :ensure t 335 - ;; :hook (rust-mode-hook . eglot-ensure) 336 - ;; :init 337 - ;; (add-hook 'rust-mode-hook (lambda () (setq indent-tabs-mode nil))) 338 - ;; :config 339 - ;; (setq rust-format-on-save t)) 340 - 341 - (use-package rustic 342 - :ensure t 343 - :config 344 - (setq rustic-lsp-client 'eglot) 345 - (setq lsp-eldoc-hook nil) 346 - (setq lsp-enable-symbol-highlighting nil) 347 - (setq lsp-signature-auto-activate nil) 348 - (setq rustic-format-on-save t) 349 - (add-hook 'rustic-mode-hook 'nesv/rustic-mode-hook)) 350 - 351 - (defun nesv/rustic-mode-hook () 352 - (when buffer-file-name 353 - (setq-local buffer-save-without-query t)) 354 - (add-hook 'before-save-hook 'lsp-format-buffer nil t)) 355 - 356 - (use-package yaml-mode :ensure t) 357 - (use-package flycheck-yamllint :ensure t) 234 + ;; Add directories containing my custom `.el' files to Emacs' load-path. 235 + (mapc 236 + (lambda (string) (add-to-list 'load-path (locate-user-emacs-file string))) 237 + '("nesv")) 358 238 359 - ;; Zig -- https://ziglang.org 360 - (use-package zig-mode :ensure t) 239 + (require 'nesv-theme) 240 + (require 'nesv-fonts) 241 + (require 'nesv-which-key) 242 + (require 'nesv-tree-sitter) 243 + (require 'nesv-programming) 244 + (when nesv-emacs-load-nerd-icons 245 + (require 'nesv-icons)) 246 + (require 'nesv-slime) 247 + (require 'nesv-gnus) 361 248 362 249 ;; ░█░█░█▀▀░█░█░█▄█░█▀█░█▀█░█▀▀ 363 250 ;; ░█▀▄░█▀▀░░█░░█░█░█▀█░█▀▀░▀▀█ ··· 380 267 ;; (which-key-add-keymap-based-replacements nesv-prefix-map 381 268 ;; "b" `("Buffer" . ,nesv-buffer-prefix-map)) 382 269 383 - ;; ░█▀▀░█░░░▀█▀░█▄█░█▀▀ 384 - ;; ░▀▀█░█░░░░█░░█░█░█▀▀ 385 - ;; ░▀▀▀░▀▀▀░▀▀▀░▀░▀░▀▀▀ 386 - (setq inferior-lisp-program "sbcl") 387 - 388 - ;; ░█▀▀░█▀█░█░█░█▀▀ 389 - ;; ░█░█░█░█░█░█░▀▀█ 390 - ;; ░▀▀▀░▀░▀░▀▀▀░▀▀▀ 391 - (setq gnus-select-method '(nntp "news.newshosting.com")) 392 - 393 270 (provide 'init) 394 271 ;;; init.el ends here 395 - 396 - (custom-set-variables 397 - ;; custom-set-variables was added by Custom. 398 - ;; If you edit it by hand, you could mess it up, so be careful. 399 - ;; Your init file should contain only one such instance. 400 - ;; If there is more than one, they won't work right. 401 - '(package-selected-packages 402 - '(ef-theme ef-themes mu4e flycheck-yamllint bazel indent-tools solaire-mode direnv neotree all-the-icons just-mode naysayer-theme zig-mode zig-mod doom-modeline yasnippet yaml-mode use-package tree-sitter-langs telephone-line sexy-monochrome-theme rustic protobuf-mode projectile powerline modus-operandi-theme magit lua-mode lsp-mode gruvbox-theme go-mode git-gutter-fringe flymake-pest flymake-lua flycheck erlang dracula-theme doom-themes dockerfile-mode cyberpunk-theme cyberpunk-2019-theme cue-mode cql-mode company-terraform cargo auto-complete apparmor-mode apache-mode ansible))) 403 - (custom-set-faces 404 - ;; custom-set-faces was added by Custom. 405 - ;; If you edit it by hand, you could mess it up, so be careful. 406 - ;; Your init file should contain only one such instance. 407 - ;; If there is more than one, they won't work right. 408 - )
+102
nesv/nesv-fonts.el
··· 1 + ;;; nesv-fonts -- Font configuration 2 + ;;; Commentary: 3 + ;;; Code: 4 + 5 + (use-package fontaine 6 + :ensure t 7 + :if (display-graphic-p) 8 + :config 9 + (setq fontaine-presets 10 + '((tiny 11 + :default-family "Iosevka Comfy Wide Fixed" 12 + :default-height 70) 13 + (small 14 + :default-family "Iosevka Comfy Fixed" 15 + :default-height 90) 16 + (regular 17 + :default-height 100) 18 + (medium 19 + :default-height 110) 20 + (medium-large 21 + :default-height 120) 22 + (large 23 + :default-weight semilight 24 + :default-height 140 25 + :bold-weight extrabold) 26 + (presentation 27 + :default-weight semlight 28 + :default-height 170 29 + :bold-weight extrabold) 30 + (t 31 + :default-family nesv-emacs-font 32 + :default-weight regular 33 + :default-height 100 34 + :fixed-pitch-family nil ; Falls back to :default-family 35 + :fixed-pitch-weight nil ; Falls back to :default-weight 36 + :fixed-pitch-height 1.0 37 + ;;:variable-pitch-family "Iosevka Comfy Wide Duo" 38 + :variable-pitch-family "Atkinson Hyperlegible" 39 + :variable-pitch-weight nil 40 + :variable-pitch-height 1.0 41 + :bold-family nil ; Whatever the underlying face has 42 + :bold-weight bold 43 + :italic-family nil 44 + :italic-slant italic 45 + :line-spacing nil))) 46 + (fontaine-set-preset 'medium-large)) 47 + 48 + (setq mono-lisa-v2-ligatures 49 + '(;; coding ligatures 50 + "<!---" "--->" "|||>" "<!--" "<|||" "<==>" "-->" "->>" "-<<" "..=" "!==" 51 + "#_(" "/==" "||>" "||=" "|->" "===" "==>" "=>>" "=<<" "=/=" ">->" ">=>" 52 + ">>-" ">>=" "<--" "<->" "<-<" "<||" "<|>" "<=" "<==" "<=>" "<=<" "<<-" 53 + "<<=" "<~>" "<~~" "~~>" ">&-" "<&-" "&>>" "&>" "->" "-<" "-~" ".=" "!=" 54 + "#_" "/=" "|=" "|>" "==" "=>" ">-" ">=" "<-" "<|" "<~" "~-" "~@" "~=" 55 + "~>" "~~" 56 + ;; whitespace ligatures 57 + "---" "'''" "\"\"\"" "..." "..<" "{|" "[|" ".?" "::" ":::" "::=" ":=" 58 + ":>" ":<" "\;\;" "!!" "!!." "!!!" "?." "?:" "??" "?=" "**" "***" "*>" 59 + "*/" "--" "#:" "#!" "#?" "##" "###" "####" "#=" "/*" "/>" "//" "/**" 60 + "///" "$(" ">&" "<&" "&&" "|}" "|]" "$>" ".." "++" "+++" "+>" "=:=" 61 + "=!=" ">:" ">>" ">>>" "<:" "<*" "<*>" "<$" "<$>" "<+" "<+>" "<>" "<<" 62 + "<<<" "</" "</>" "^=" "%%")) 63 + 64 + (setq berkeley-mono-ligatures 65 + '(;; Group A 66 + ".." ".=" "..." "..<" "::" ":::" ":=" "::=" ";;" ";;;" "??" "???" 67 + ".?" "?." ":?" "?:" "?=" "**" "***" "/*" "*/" "/**" 68 + ;; Group B 69 + "<-" "->" "-<" ">-" "<--" "-->" "<<-" "->>" "-<<" ">>-" "<-<" ">->" 70 + "<-|" "|->" "-|" "|-" "||-" "<!--" "<#--" "<=" "=>" ">=" "<==" "==>" 71 + "<<=" "=>>" "=<<" ">>=" "<=<" ">=>" "<=|" "|=>" "<=>" "<==>" "||=" 72 + "|=" "//=" "/=" 73 + ;; Group C 74 + "<<" ">>" "<<<" ">>>" "<>" "<$" "$>" "<$>" "<+" "+>" "<+>" "<:" ":<" 75 + "<:<" ">:" ":>" "<~" "~>" "<~>" "<<~" "<~~" "~~>" "~~" "<|" "|>" 76 + "<|>" "<||" "||>" "<|||" "|||>" "</" "/>" "</>" "<*" "*>" "<*>" ":?>" 77 + ;; Group D 78 + "#(" "#{" "#[" "]#" "#!" "#?" "#=" "#_" "#_(" "##" "###" "####" 79 + ;; Group E 80 + "[|" "|]" "[<" ">]" "{!!" "!!}" "{|" "|}" "{{" "}}" "{{--" "--}}" 81 + "{!--" "//" "///" "!!" 82 + ;; Group F 83 + "www" "@_" "&&" "&&&" "&=" "~@" "++" "+++" "/\\" "\\/" "_|_" "||" 84 + ;; Group G 85 + "=:" "=:=" "=!=" "==" "===" "=/=" "=~" "~-" "^=" "__" "!=" "!==" "-~" 86 + "--" "---")) 87 + 88 + (use-package ligature 89 + :ensure t 90 + :defer t 91 + :if (display-graphic-p) 92 + :config 93 + (when (or (eq nesv-emacs-font "MonoLisa") 94 + (eq nesv-emacs-font "Berkeley Mono")) 95 + (ligature-set-ligatures 'prog-mode (pcase nesv-emacs-font 96 + ("MonoLisa" mono-lisa-v2-ligatures) 97 + ("Berkeley Mono" berkeley-mono-ligatures)))) 98 + (global-ligature-mode t)) 99 + 100 + 101 + (provide 'nesv-fonts) 102 + ;;; nesv-fonts.el ends here
+24
nesv/nesv-git.el
··· 1 + ;;; nesv-git -- Git configuration 2 + ;;; Commentary: 3 + ;;; Code: 4 + 5 + (use-package magit 6 + :ensure t 7 + :hook (after-save-hook . magit-after-save-refresh-status)) 8 + 9 + ;; Git Gutter -- Shows git status in the sidebar 10 + (use-package git-gutter 11 + :ensure t 12 + :hook (prog-mode . git-gutter-mode) 13 + :config 14 + (setq git-gutter:update-interval 0.2)) 15 + 16 + (use-package git-gutter-fringe 17 + :ensure t 18 + :config 19 + (define-fringe-bitmap 'git-gutter-fr:added [224] nil nil '(center repeated)) 20 + (define-fringe-bitmap 'git-gutter-fr:modified [224] nil nil '(center repeated)) 21 + (define-fringe-bitmap 'git-gutter-fr:deleted [128 192 224 240] nil nil 'bottom)) 22 + 23 + (provide 'nesv-git) 24 + ;;; nesv-git.el ends here
+8
nesv/nesv-gnus.el
··· 1 + ;;; nesv-gnus -- GNUS configuration 2 + ;;; Commentary: 3 + ;;; Code: 4 + 5 + (setq gnus-select-method '(nntp "news.newshosting.com")) 6 + 7 + (provide 'nesv-gnus) 8 + ;;; nesv-gnus.el ends here
+20
nesv/nesv-icons.el
··· 1 + ;;; nesv-icons.el -- Icon snazziness 2 + ;;; Commentary: 3 + ;; ░▀█▀░█▀▀░█▀█░█▀█░█▀▀ 4 + ;; ░░█░░█░░░█░█░█░█░▀▀█ 5 + ;; ░▀▀▀░▀▀▀░▀▀▀░▀░▀░▀▀▀ 6 + ;;; Code: 7 + (use-package nerd-icons 8 + :ensure t) 9 + 10 + (use-package nerd-icons-completion 11 + :ensure t 12 + :hook (marginalia-mode . nerd-icons-completion-marginalia-setup)) 13 + 14 + (use-package nerd-icons-dired 15 + :ensure t 16 + :hook 17 + (dired-mode . nerd-icons-dired-mode)) 18 + 19 + (provide 'nesv-icons) 20 + ;;; nesv-icons.el ends here
+116
nesv/nesv-programming.el
··· 1 + ;;; nesv-programming.el -- Configuration for programming-related things. 2 + ;;; Commentary: 3 + ;; This file installs any packages that are useful in my day-to-day programming 4 + ;; tasks. 5 + ;;; Code: 6 + 7 + ;; ░█▀█░█▀▀░█▀▀░▀█▀░▀█▀░█▀▄░█▀█░█▀▀ 8 + ;; ░█▀█░▀▀█░█░░░░█░░░█░░█░█░█░█░█░░ 9 + ;; ░▀░▀░▀▀▀░▀▀▀░▀▀▀░▀▀▀░▀▀░░▀▀▀░▀▀▀ 10 + (use-package adoc-mode 11 + :ensure t) 12 + 13 + ;; Bazel, Starlark, Tilt, etc. 14 + (use-package bazel 15 + :ensure t 16 + :mode 17 + ("Tiltfile.\\'" . bazel-mode)) 18 + 19 + ;; ░█▀▀░█░█░█▀▀ 20 + ;; ░█░░░█░█░█▀▀ 21 + ;; ░▀▀▀░▀▀▀░▀▀▀ 22 + ;; https://cuelang.org 23 + (use-package cue-mode 24 + :ensure t) 25 + 26 + (use-package dockerfile-mode 27 + :ensure t) 28 + 29 + ;; ░█▀▀░█▀█ 30 + ;; ░█░█░█░█ 31 + ;; ░▀▀▀░▀▀▀ 32 + (use-package go-mode 33 + :ensure t 34 + :hook 35 + ((before-save . gofmt-before-save) 36 + (go-mode-hook . lsp-deferred)) 37 + :config 38 + (setq gofmt-command "goimports")) 39 + 40 + ;; HashiCorp Configuration Language 41 + (use-package hcl-mode 42 + :ensure t) 43 + (use-package terraform-mode 44 + :ensure t 45 + :hook 46 + (terraform-mode . outline-minor-mode)) 47 + 48 + ;; ░▀▀█░█░█░█▀▀░▀█▀ 49 + ;; ░░░█░█░█░▀▀█░░█░ 50 + ;; ░▀▀░░▀▀▀░▀▀▀░░▀░ 51 + ;; https://just.systems 52 + (use-package just-mode 53 + :ensure t) 54 + 55 + ;; ░█▄█░█▀█░█▀▄░█░█░█▀▄░█▀█░█░█░█▀█ 56 + ;; ░█░█░█▀█░█▀▄░█▀▄░█░█░█░█░█▄█░█░█ 57 + ;; ░▀░▀░▀░▀░▀░▀░▀░▀░▀▀░░▀▀▀░▀░▀░▀░▀ 58 + (use-package markdown-mode 59 + :ensure t 60 + :mode 61 + ("README\\.md\\'" . gfm-mode) 62 + :hook 63 + (markdown-mode . auto-fill-mode) 64 + :init 65 + (setq markdown-command "multimarkdown") 66 + :config 67 + (setq markdown-fontify-code-blocks-natively t)) 68 + 69 + ;; ░█▀▀░█▀▀░█░█ 70 + ;; ░█░░░▀▀█░▀▄▀ 71 + ;; ░▀▀▀░▀▀▀░░▀░ 72 + (use-package csv-mode 73 + :ensure t 74 + :commands (csv-align-mode)) 75 + 76 + ;; ░█▀█░█▀▄░█▀█░▀█▀░█▀█░█▀▄░█░█░█▀▀ 77 + ;; ░█▀▀░█▀▄░█░█░░█░░█░█░█▀▄░█░█░█▀▀ 78 + ;; ░▀░░░▀░▀░▀▀▀░░▀░░▀▀▀░▀▀░░▀▀▀░▀░░ 79 + (use-package protobuf-mode 80 + :ensure t) 81 + 82 + ;; ░█▀▄░█░█░█▀▀░▀█▀ 83 + ;; ░█▀▄░█░█░▀▀█░░█░ 84 + ;; ░▀░▀░▀▀▀░▀▀▀░░▀░ 85 + (use-package rustic 86 + :ensure t 87 + :config 88 + (setq rustic-lsp-client 'eglot) 89 + (setq lsp-eldoc-hook nil) 90 + (setq lsp-enable-symbol-highlighting nil) 91 + (setq lsp-signature-auto-activate nil) 92 + (setq rustic-format-on-save t) 93 + (add-hook 'rustic-mode-hook 'nesv/rustic-mode-hook)) 94 + 95 + (defun nesv/rustic-mode-hook () 96 + (when buffer-file-name 97 + (setq-local buffer-save-without-query t)) 98 + (add-hook 'before-save-hook 'lsp-format-buffer nil t)) 99 + 100 + ;; ░█░█░█▀█░█▄█░█░░ 101 + ;; ░░█░░█▀█░█░█░█░░ 102 + ;; ░░▀░░▀░▀░▀░▀░▀▀▀ 103 + (use-package yaml-mode 104 + :ensure t) 105 + 106 + (use-package flycheck-yamllint 107 + :ensure t) 108 + 109 + ;; ░▀▀█░▀█▀░█▀▀ 110 + ;; ░▄▀░░░█░░█░█ 111 + ;; ░▀▀▀░▀▀▀░▀▀▀ 112 + (use-package zig-mode 113 + :ensure t) 114 + 115 + (provide 'nesv-programming) 116 + ;;; nesv-programming.el ends here
+7
nesv/nesv-slime.el
··· 1 + ;;; nesv-slime -- Superior LISP Interaction Mode for Emacs 2 + ;;; Commentary: 3 + ;;; Code: 4 + (setq inferior-lisp-program "sbcl") 5 + 6 + (provide 'nesv-slime) 7 + ;;; nesv-slime.el ends here
+48
nesv/nesv-theme.el
··· 1 + ;;; nesv-theme.el -- Colour theme configuration 2 + ;;; Commentary: 3 + ;;; ░█▀▀░█▀█░█░░░█▀█░█░█░█▀▄░░░▀█▀░█░█░█▀▀░█▄█░█▀▀░█▀▀ 4 + ;;; ░█░░░█░█░█░░░█░█░█░█░█▀▄░░░░█░░█▀█░█▀▀░█░█░█▀▀░▀▀█ 5 + ;;; ░▀▀▀░▀▀▀░▀▀▀░▀▀▀░▀▀▀░▀░▀░░░░▀░░▀░▀░▀▀▀░▀░▀░▀▀▀░▀▀▀ 6 + ;;; Code: 7 + 8 + ;; A recreation of Jonathan Blow's emacs theme. 9 + (use-package naysayer-theme 10 + :ensure t) 11 + 12 + ;; EF-THEMES -- https://protesilaos.com/emacs/ef-themes 13 + (use-package ef-themes 14 + :ensure t) 15 + 16 + ;; MODUS THEMES -- https://protesilaos.com/emacs/modus-themes 17 + (use-package modus-themes 18 + :ensure t) 19 + 20 + (when nesv-emacs-load-theme 21 + (load-theme 22 + (pcase nesv-emacs-load-theme 23 + ('ef 'ef-bio) 24 + ('modus 'modus-vivendi-tinted) 25 + ('naysayer 'naysayer)) 26 + t)) 27 + 28 + (load-theme 'ef-bio t) 29 + 30 + (use-package spacious-padding 31 + :ensure t 32 + :if (display-graphic-p) 33 + :hook (after-init . spacious-padding-mode) 34 + :bind ("<f8>" . spacious-padding-mode) 35 + :init 36 + (setq spacious-padding-widths 37 + '( :internal-border-width 30 38 + :header-line-width 4 39 + :mode-line-width 6 40 + :tab-width 4 41 + :right-divider-width 30 42 + :scroll-bar-width 8 43 + :left-fringe-width 20 44 + :right-fringe-width 20)) 45 + (setq spacious-padding-subtle-mode-line nil)) 46 + 47 + (provide 'nesv-theme) 48 + ;;; nesv-theme.el ends here
+15
nesv/nesv-tree-sitter.el
··· 1 + ;;; nesv-tree-sitter -- tree-sitter configuration 2 + ;;; Commentary: 3 + ;;; Code: 4 + 5 + (use-package tree-sitter 6 + :ensure t) 7 + 8 + (use-package tree-sitter-langs 9 + :ensure t 10 + :hook (tree-sitter-after-on-hook . tree-sitter-hl-mode) 11 + :config 12 + (global-tree-sitter-mode)) 13 + 14 + (provide 'nesv-tree-sitter) 15 + ;;; nesv-tree-sitter.el ends here
+18
nesv/nesv-which-key.el
··· 1 + ;;; nesv-which-key -- WHICH-KEY configuration 2 + ;;; Commentary: 3 + ;;; Code: 4 + 5 + (use-package which-key 6 + :ensure t 7 + :hook (after-init . which-key-mode) 8 + :config 9 + (setq which-key-separator " ") 10 + (setq which-key-prefix-prefix "... ") 11 + (setq which-key-max-display-columns 3) 12 + (setq which-key-idle-delay 1.5) 13 + (setq which-key-idle-secondary-delay 0.25) 14 + (setq which-key-add-column-padding 1) 15 + (setq which-key-max-description-length 40)) 16 + 17 + (provide 'nesv-which-key) 18 + ;;; nesv-which-key.el ends here