this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

emacs: incorporate bits from emacs-solo

Aria 277e0f18 6784ba4f

+200 -35
+125 -21
nix/modules/services/emacs/config/config-appearance.el
··· 1 - ;;;; Remove a bunch of default elements 1 + ;;;; appearance - Remove a bunch of default elements 2 2 (setq inhibit-startup-message t 3 3 initial-scratch-message nil 4 4 ring-bell-function 'ignore) ··· 25 25 (when (or (daemonp) (display-graphic-p)) 26 26 (aria/set-gui-prefs)) 27 27 28 - ;;;; Theme 29 - (let ((theme-file-name (concat (if load-file-name 30 - ;; File is being loaded. 31 - (file-name-directory load-file-name) 32 - ;; File is being evaluated using, for example, `eval-buffer'. 33 - default-directory) 34 - "/../config-theme.el"))) 35 - (if (file-exists-p theme-file-name) 36 - (progn (message "Loading theme from config-theme.el, generated by nix") 37 - (load-file theme-file-name) 38 - (require 'config-theme)) ;; Generated by Nix 39 - (message "Loading default theme (mocha)") 40 - (use-package catppuccin-theme 41 - :defer nil 42 - :config 43 - (load-theme 'catppuccin :no-confirm) 44 - (setq catppuccin-flavor 'mocha) 45 - (catppuccin-reload)))) 46 - 47 - 48 28 ;;;; Modeline 49 29 (use-package doom-modeline 50 30 :defer nil ··· 58 38 (doom-modeline-mode 1) 59 39 (line-number-mode 0) 60 40 (column-number-mode 0)) 41 + 42 + ;;;; Catppuccin mocha, using modus theme 43 + ;;;; From here: https://github.com/LionyxML/emacs-solo/blob/main/lisp/emacs-solo-themes.el#L16 44 + (use-package modus-themes 45 + :ensure nil 46 + :defer t 47 + :custom 48 + (modus-themes-italic-constructs t) 49 + (modus-themes-bold-constructs t) 50 + (modus-themes-mixed-fonts nil) 51 + (modus-themes-prompts '(bold intense)) 52 + (modus-themes-common-palette-overrides 53 + `((accent-0 "#89b4fa") 54 + (accent-1 "#89dceb") 55 + (bg-active bg-main) 56 + (bg-added "#364144") 57 + (bg-added-refine "#4a5457") 58 + (bg-changed "#3e4b6c") 59 + (bg-changed-refine "#515d7b") 60 + (bg-completion "#45475a") 61 + (bg-completion-match-0 "#1e1e2e") 62 + (bg-completion-match-1 "#1e1e2e") 63 + (bg-completion-match-2 "#1e1e2e") 64 + (bg-completion-match-3 "#1e1e2e") 65 + (bg-hl-line "#2a2b3d") 66 + (bg-hover-secondary "#585b70") 67 + (bg-line-number-active unspecified) 68 + (bg-line-number-inactive "#1e1e2e") 69 + (bg-main "#1e1e2e") 70 + (bg-mark-delete "#443245") 71 + (bg-mark-select "#3e4b6c") 72 + (bg-mode-line-active "#181825") 73 + (bg-mode-line-inactive "#181825") 74 + (bg-prominent-err "#443245") 75 + (bg-prompt unspecified) 76 + (bg-prose-block-contents "#313244") 77 + (bg-prose-block-delimiter bg-prose-block-contents) 78 + (bg-region "#585b70") 79 + (bg-removed "#443245") 80 + (bg-removed-refine "#574658") 81 + (bg-tab-bar "#1e1e2e") 82 + (bg-tab-current bg-main) 83 + (bg-tab-other "#181825") 84 + (border-mode-line-active nil) 85 + (border-mode-line-inactive nil) 86 + (builtin "#89b4fa") 87 + (comment "#9399b2") 88 + (constant "#f38ba8") 89 + (cursor "#f5e0dc") 90 + (date-weekday "#89b4fa") 91 + (date-weekend "#fab387") 92 + (docstring "#a6adc8") 93 + (err "#f38ba8") 94 + (fg-active fg-main) 95 + (fg-completion "#cdd6f4") 96 + (fg-completion-match-0 "#89b4fa") 97 + (fg-completion-match-1 "#f38ba8") 98 + (fg-completion-match-2 "#a6e3a1") 99 + (fg-completion-match-3 "#fab387") 100 + (fg-heading-0 "#f38ba8") 101 + (fg-heading-1 "#fab387") 102 + (fg-heading-2 "#f9e2af") 103 + (fg-heading-3 "#a6e3a1") 104 + (fg-heading-4 "#74c7ec") 105 + (fg-line-number-active "#b4befe") 106 + (fg-line-number-inactive "#7f849c") 107 + (fg-link "#89b4fa") 108 + (fg-main "#cdd6f4") 109 + (fg-mark-delete "#f38ba8") 110 + (fg-mark-select "#89b4fa") 111 + (fg-mode-line-active "#bac2de") 112 + (fg-mode-line-inactive "#585b70") 113 + (fg-prominent-err "#f38ba8") 114 + (fg-prompt "#cba6f7") 115 + (fg-prose-block-delimiter "#9399b2") 116 + (fg-prose-verbatim "#a6e3a1") 117 + (fg-region "#cdd6f4") 118 + (fnname "#89b4fa") 119 + (fringe "#1e1e2e") 120 + (identifier "#cba6f7") 121 + (info "#94e2d5") 122 + (keyword "#cba6f7") 123 + (keyword "#cba6f7") 124 + (name "#89b4fa") 125 + (number "#fab387") 126 + (property "#89b4fa") 127 + (string "#a6e3a1") 128 + (type "#f9e2af") 129 + (variable "#fab387") 130 + (warning "#f9e2af"))) 131 + :config 132 + (modus-themes-with-colors 133 + (custom-set-faces 134 + `(change-log-acknowledgment ((,c :foreground "#b4befe"))) 135 + `(change-log-date ((,c :foreground "#a6e3a1"))) 136 + `(change-log-name ((,c :foreground "#fab387"))) 137 + `(diff-context ((,c :foreground "#89b4fa"))) 138 + `(diff-file-header ((,c :foreground "#f5c2e7"))) 139 + `(diff-header ((,c :foreground "#89b4fa"))) 140 + `(diff-hunk-header ((,c :foreground "#fab387"))) 141 + `(gnus-button ((,c :foreground "#8aadf4"))) 142 + `(gnus-group-mail-3 ((,c :foreground "#8aadf4"))) 143 + `(gnus-group-mail-3-empty ((,c :foreground "#8aadf4"))) 144 + `(gnus-header-content ((,c :foreground "#7dc4e4"))) 145 + `(gnus-header-from ((,c :foreground "#cba6f7"))) 146 + `(gnus-header-name ((,c :foreground "#a6e3a1"))) 147 + `(gnus-header-subject ((,c :foreground "#8aadf4"))) 148 + `(log-view-message ((,c :foreground "#b4befe"))) 149 + `(match ((,c :background "#3e5768" :foreground "#cdd6f5"))) 150 + `(modus-themes-search-current ((,c :background "#f38ba8" :foreground "#11111b" ))) ;; :foreground "#cdd6f4" -- Catppuccin default, not that visible... 151 + `(modus-themes-search-lazy ((,c :background "#3e5768" :foreground "#cdd6f5"))) ;; :foreground "#cdd6f4" :background "#94e2d5" -- Catppuccin default, not that visible... 152 + `(newsticker-extra-face ((,c :foreground "#9399b2" :height 0.8 :slant italic))) 153 + `(newsticker-feed-face ((,c :foreground "#f38ba8" :height 1.2 :weight bold))) 154 + `(newsticker-treeview-face ((,c :foreground "#cdd6f4"))) 155 + `(newsticker-treeview-selection-face ((,c :background "#3e5768" :foreground "#cdd6f5"))) 156 + `(tab-bar ((,c :background "#181825" :foreground "#bac2de"))) 157 + `(tab-bar-tab ((,c :background "#1e1e2e" :underline nil))) 158 + `(tab-bar-tab-inactive ((,c :background "#181825" :foreground "#00ff00"))) 159 + `(tab-bar-tab-group-current ((,c :background "#1e1e2e" :foreground "#bac2de" :underline t))) 160 + `(tab-bar-tab-group-inactive ((,c :background "#1e1e2e" :foreground "#9399b2"))) 161 + `(vc-dir-file ((,c :foreground "#89b4fa"))) 162 + `(vc-dir-header-value ((,c :foreground "#b4befe"))))) 163 + :init 164 + (load-theme 'modus-vivendi t)) 61 165 62 166 (provide 'config-appearance)
+74 -3
nix/modules/services/emacs/config/config-code.el
··· 24 24 (require 'smartparens-config)) 25 25 26 26 ;; Colour pairs differently 27 - (use-package rainbow-delimiters 28 - :hook prog-mode) 27 + ;; From https://github.com/LionyxML/emacs-solo/blob/main/lisp/emacs-solo-rainbow-delimiters.el 28 + (defun emacs-solo-rainbow-delimiters () 29 + "Apply simple rainbow coloring to (), [] and {} in the current buffer. 30 + Opening and closing delimiters will have matching colors." 31 + (interactive) 32 + (let ((colors '(font-lock-function-name-face 33 + font-lock-builtin-face 34 + font-lock-type-face 35 + font-lock-keyword-face 36 + font-lock-variable-name-face 37 + font-lock-constant-face 38 + font-lock-string-face))) 39 + (font-lock-add-keywords 40 + nil 41 + `((,(rx (or "(" ")" "[" "]" "{" "}")) 42 + (0 (let* ((char (char-after (match-beginning 0))) 43 + (depth (save-excursion 44 + ;; Move to the correct position based on opening/closing delimiter 45 + (if (member char '(?\) ?\] ?\})) 46 + (progn 47 + (backward-char) ;; Move to the opening delimiter 48 + (car (syntax-ppss))) 49 + (car (syntax-ppss))))) 50 + (face (nth (mod depth ,(length colors)) ',colors))) 51 + (list 'face face))))))) 52 + (font-lock-flush) 53 + (font-lock-ensure)) 54 + (add-hook 'prog-mode-hook #'emacs-solo-rainbow-delimiters) 29 55 30 56 ;;;; .envrc sourcing 31 57 (use-package direnv ··· 41 67 ;; Show docs at point 42 68 ("<normal-state> K" . 'eldoc)) 43 69 :init 44 - (setq eldoc-echo-area-prefer-doc-buffer t) 70 + (setq eldoc-echo-area-prefer-doc-buffer t 71 + eglot-autoshutdown t 72 + eglot-events-buffer-size 0 73 + eglot-events-buffer-config '(:size 0 :format full) 74 + eglot-prefer-plaintext nil 75 + jsonrpc-event-hook nil 76 + eglot-code-action-indications nil) 45 77 :config 46 78 (add-hook 'eglot-managed-mode-hook #'aria/eglot-keys)) 47 79 ··· 52 84 (define-key evil-motion-state-local-map (kbd "SPC l a") 'eglot-code-actions) 53 85 (define-key evil-motion-state-local-map (kbd "SPC a") 'consult-eglot-symbols) 54 86 (define-key evil-motion-state-local-map (kbd "SPC l r") 'eglot-rename)))) 87 + 88 + 89 + ;;; Compilation 90 + (use-package compile 91 + :custom 92 + (compilation-always-kill t) 93 + (compilation-scroll-output t) 94 + (ansi-color-for-compilation-mode t) 95 + :config 96 + (add-hook 'compilation-filter-hook #'ansi-color-compilation-filter)) 97 + 98 + (use-package flymake 99 + :defer t 100 + :hook (prog-mode-hook . flymake-mode) 101 + :bind (:map leader-map 102 + ("n" . flymake-goto-next-error) 103 + ("! t" . toggle-flymake-diagnostics-at-eol)) 104 + :custom 105 + (flymake-show-diagnostics-at-end-of-line nil) 106 + (flymake-indicator-type 'fringes) 107 + (flymake-margin-indicators-string 108 + `((error "!" compilation-error) 109 + (warning "?" compilation-warning) 110 + (note "i" compilation-info))) 111 + :config 112 + ;; Define the toggle function 113 + (defun toggle-flymake-diagnostics-at-eol () 114 + "Toggle the display of Flymake diagnostics at the end of the line 115 + and restart Flymake to apply the changes." 116 + (interactive) 117 + (setq flymake-show-diagnostics-at-end-of-line 118 + (not flymake-show-diagnostics-at-end-of-line)) 119 + (flymake-mode -1) ;; Disable Flymake 120 + (flymake-mode 1) ;; Re-enable Flymake 121 + (message "Flymake diagnostics at end of line: %s" 122 + (if flymake-show-diagnostics-at-end-of-line 123 + "Enabled" "Disabled")))) 124 + 125 + (add-hook 'emacs-lisp-mode (lambda () (interactive) (setq flymake-diagnostic-functions '(elisp-flymake-byte-compile t)))) 55 126 56 127 ;; Workspace search 57 128 (use-package consult-eglot
+1 -3
nix/modules/services/emacs/config/config-navigation.el
··· 8 8 ;; Buffer navigation 9 9 ("f" . 'find-file) 10 10 ("j" . 'evil-switch-to-windows-last-buffer) 11 - ("w" . 'evil-window-map) 12 - ("m" . 'switch-to-next-buffer) 13 - ("n" . 'switch-to-prev-buffer))) 11 + ("w" . 'evil-window-map))) 14 12 15 13 ;;;; More navigation options 16 14 (use-package consult
-2
nix/modules/services/emacs/default.nix
··· 13 13 cfg = config.services.emacs; 14 14 15 15 emacs = (if cfg.nox then pkgs.aria-emacs-nox else pkgs.aria-emacs).overrideAttrs { 16 - theme = config.colours.scheme.flavour; 17 - inherit (config.colours.scheme) accent; 18 16 withOrg = true; 19 17 }; 20 18 in
-6
nix/modules/services/emacs/overlay.nix
··· 5 5 buildAriaEmacs = 6 6 { 7 7 emacsBase, 8 - theme ? "mocha", 9 - accent ? "red", 10 8 withOrg ? true, 11 9 ... 12 10 }: ··· 18 16 epkgs.no-littering 19 17 20 18 # config-appearance.el 21 - epkgs.catppuccin-theme 22 19 epkgs.doom-modeline 23 20 24 21 # config-help.el ··· 45 42 # config-code.el 46 43 epkgs.evil-nerd-commenter 47 44 epkgs.smartparens 48 - epkgs.rainbow-delimiters 49 45 epkgs.direnv 50 46 epkgs.eglot 51 47 epkgs.consult-eglot ··· 88 84 basePackage = emacsWithoutDesktop; 89 85 programs.emacs = { 90 86 env = { 91 - ARIA_EMACS_THEME.value = theme; 92 - ARIA_EMACS_ACCENT.value = accent; 93 87 ARIA_EMACS_WITH_ORG.value = if withOrg then "1" else "0"; 94 88 }; 95 89 prependFlags = [