diff options
| author | cashmere <cashmere@autistici.org> | 2025-10-09 01:05:32 +0200 |
|---|---|---|
| committer | cashmere <cashmere@autistici.org> | 2025-10-09 01:05:32 +0200 |
| commit | c55de7b06a511125b6bcb158835b6bfb8b2c7aea (patch) | |
| tree | ac9794e1f81a75e0ecc1c0665a04bb5249410f4f | |
| parent | e49ed64844c6f792ebb9e5828a4b666b4f9326fc (diff) | |
| download | emacs-c55de7b06a511125b6bcb158835b6bfb8b2c7aea.tar.gz | |
sync
| -rw-r--r-- | config.el | 226 | ||||
| -rw-r--r-- | config.org | 89 |
2 files changed, 139 insertions, 176 deletions
@@ -57,109 +57,109 @@ ;; (setq straight-use-package-by-default t) ;;; EMACS -;; This is biggest one. Keep going, plugins (oops, I mean packages) will be shorter :) -(setq debug-on-error t) -(use-package emacs - :straight nil - :ensure nil - :custom ;; Set custom variables to configure Emacs behavior. - (column-number-mode t) ;; Display the column number in the mode line. - (auto-save-default nil) ;; Disable automatic saving of buffers. - (create-lockfiles nil) ;; Prevent the creation of lock files when editing. - (delete-by-moving-to-trash t) ;; Move deleted files to the trash instead of permanently deleting them. - (delete-selection-mode 1) ;; Enable replacing selected text with typed text. - (display-line-numbers-type 'relative) ;; Use relative line numbering in programming modes. - (global-auto-revert-non-file-buffers t) ;; Automatically refresh non-file buffers. - (history-length 25) ;; Set the length of the command history. - (inhibit-startup-message t) ;; Disable the startup message when Emacs launches. - (initial-scratch-message "") ;; Clear the initial message in the *scratch* buffer. - (ispell-dictionary "en_US") ;; Set the default dictionary for spell checking. - (make-backup-files nil) ;; Disable creation of backup files. - ;; (pixel-scroll-precision-mode t) ;; Enable precise pixel scrolling. - (pixel-scroll-precision-use-momentum nil) ;; Disable momentum scrolling for pixel precision. - (ring-bell-function 'ignore) ;; Disable the audible bell. - (split-width-threshold 300) ;; Prevent automatic window splitting if the window width exceeds 300 pixels. - (switch-to-buffer-obey-display-actions t) ;; Make buffer switching respect display actions. - (tab-always-indent 'complete) ;; Make the TAB key complete text instead of just indenting. - (tab-width 4) ;; Set the tab width to 4 spaces. - (treesit-font-lock-level 4) ;; Use advanced font locking for Treesit mode. - (truncate-lines t) ;; Enable line truncation to avoid wrapping long lines. - (use-dialog-box nil) ;; Disable dialog boxes in favor of minibuffer prompts. - (use-short-answers t) ;; Use short answers in prompts for quicker responses (y instead of yes) - (warning-minimum-level :emergency) ;; Set the minimum level of warnings to display. + ;; This is biggest one. Keep going, plugins (oops, I mean packages) will be shorter :) + (setq debug-on-error t) + (use-package emacs + :straight nil + :ensure nil + :custom ;; Set custom variables to configure Emacs behavior. + (column-number-mode t) ;; Display the column number in the mode line. + (auto-save-default nil) ;; Disable automatic saving of buffers. + (create-lockfiles nil) ;; Prevent the creation of lock files when editing. + (delete-by-moving-to-trash t) ;; Move deleted files to the trash instead of permanently deleting them. + (delete-selection-mode 1) ;; Enable replacing selected text with typed text. + (display-line-numbers-type 'relative) ;; Use relative line numbering in programming modes. + (global-auto-revert-non-file-buffers t) ;; Automatically refresh non-file buffers. + (history-length 25) ;; Set the length of the command history. + (inhibit-startup-message t) ;; Disable the startup message when Emacs launches. + (initial-scratch-message "") ;; Clear the initial message in the *scratch* buffer. + (ispell-dictionary "en_US") ;; Set the default dictionary for spell checking. + (make-backup-files nil) ;; Disable creation of backup files. + ;; (pixel-scroll-precision-mode t) ;; Enable precise pixel scrolling. + (pixel-scroll-precision-use-momentum nil) ;; Disable momentum scrolling for pixel precision. + (ring-bell-function 'ignore) ;; Disable the audible bell. + (split-width-threshold 300) ;; Prevent automatic window splitting if the window width exceeds 300 pixels. + (switch-to-buffer-obey-display-actions t) ;; Make buffer switching respect display actions. + (tab-always-indent 'complete) ;; Make the TAB key complete text instead of just indenting. + (tab-width 4) ;; Set the tab width to 4 spaces. + (treesit-font-lock-level 4) ;; Use advanced font locking for Treesit mode. + (truncate-lines t) ;; Enable line truncation to avoid wrapping long lines. + (use-dialog-box nil) ;; Disable dialog boxes in favor of minibuffer prompts. + (use-short-answers t) ;; Use short answers in prompts for quicker responses (y instead of yes) + (warning-minimum-level :emergency) ;; Set the minimum level of warnings to display. - :hook ;; Add hooks to enable specific features in certain modes. - (prog-mode . display-line-numbers-mode) - (org-mode . display-line-numbers-mode) - ;; (org-mode . (lambda () (display-line-numbers-mode -1))) + :hook ;; Add hooks to enable specific features in certain modes. + (prog-mode . display-line-numbers-mode) + (org-mode . display-line-numbers-mode) + ;; (org-mode . (lambda () (display-line-numbers-mode -1))) - :config - (add-to-list 'custom-theme-load-path user-emacs-directory) - ;; (load-theme 'rose-pine t) + :config + (add-to-list 'custom-theme-load-path user-emacs-directory) + ;; (load-theme 'rose-pine t) - ;; By default emacs gives you access to a lot of *special* buffers, while navigating with [b and ]b, - ;; this might be confusing for newcomers. This settings make sure ]b and [b will always load a - ;; file buffer. To see all buffers use <leader> SPC, <leader> b l, or <leader> b i. - (defun skip-these-buffers (_window buffer _bury-or-kill) - "Function for `switch-to-prev-buffer-skip'." - (string-match "\\*[^*]+\\*" (buffer-name buffer))) - (setq switch-to-prev-buffer-skip 'skip-these-buffers) + ;; By default emacs gives you access to a lot of *special* buffers, while navigating with [b and ]b, + ;; this might be confusing for newcomers. This settings make sure ]b and [b will always load a + ;; file buffer. To see all buffers use <leader> SPC, <leader> b l, or <leader> b i. + (defun skip-these-buffers (_window buffer _bury-or-kill) + "Function for `switch-to-prev-buffer-skip'." + (string-match "\\*[^*]+\\*" (buffer-name buffer))) + (setq switch-to-prev-buffer-skip 'skip-these-buffers) - ;; Configure font settings based on the operating system. - ;; Ok, this kickstart is meant to be used on the terminal, not on GUI. - ;; But without this, I fear you could start Graphical Emacs and be sad :( - (set-face-attribute 'default nil :family "Fragment Mono" :height 160) - ;; (when (eq system-type 'darwin) ;; Check if the system is macOS. - ;; (setq mac-command-modifier 'meta) ;; Set the Command key to act as the Meta key. - ;; (set-face-attribute 'default nil :family "Fragment Mono" :height 130)) + ;; Configure font settings based on the operating system. + ;; Ok, this kickstart is meant to be used on the terminal, not on GUI. + ;; But without this, I fear you could start Graphical Emacs and be sad :( + (set-face-attribute 'default nil :family "Maple Mono NF" :height 160) + ;; (when (eq system-type 'darwin) ;; Check if the system is macOS. + ;; (setq mac-command-modifier 'meta) ;; Set the Command key to act as the Meta key. + ;; (set-face-attribute 'default nil :family "Fragment Mono" :height 130)) - ;; Save manual customizations to a separate file instead of cluttering `init.el'. - ;; You can M-x customize, M-x customize-group, or M-x customize-themes, etc. - ;; The saves you do manually using the Emacs interface would overwrite this file. - ;; The following makes sure those customizations are in a separate file. - (setq custom-file (locate-user-emacs-file "custom-vars.el")) ;; Specify the custom file path. - (load custom-file 'noerror 'nomessage) ;; Load the custom file quietly, ignoring errors. + ;; Save manual customizations to a separate file instead of cluttering `init.el'. + ;; You can M-x customize, M-x customize-group, or M-x customize-themes, etc. + ;; The saves you do manually using the Emacs interface would overwrite this file. + ;; The following makes sure those customizations are in a separate file. + (setq custom-file (locate-user-emacs-file "custom-vars.el")) ;; Specify the custom file path. + (load custom-file 'noerror 'nomessage) ;; Load the custom file quietly, ignoring errors. - ;; Makes Emacs vertical divisor the symbol │ instead of |. - (set-display-table-slot standard-display-table 'vertical-border (make-glyph-code ?│)) + ;; Makes Emacs vertical divisor the symbol │ instead of |. + (set-display-table-slot standard-display-table 'vertical-border (make-glyph-code ?│)) - :init ;; Initialization settings that apply before the package is loaded. - (tool-bar-mode -1) ;; Disable the tool bar for a cleaner interface. - (menu-bar-mode -1) ;; Disable the menu bar for a more streamlined look. + :init ;; Initialization settings that apply before the package is loaded. + (tool-bar-mode -1) ;; Disable the tool bar for a cleaner interface. + (menu-bar-mode -1) ;; Disable the menu bar for a more streamlined look. - (when scroll-bar-mode - (scroll-bar-mode -1)) ;; Disable the scroll bar if it is active. + (when scroll-bar-mode + (scroll-bar-mode -1)) ;; Disable the scroll bar if it is active. - (global-hl-line-mode -1) ;; Disable highlight of the current line - (global-auto-revert-mode 1) ;; Enable global auto-revert mode to keep buffers up to date with their corresponding files. - (indent-tabs-mode -1) ;; Disable the use of tabs for indentation (use spaces instead). - (recentf-mode 1) ;; Enable tracking of recently opened files. - (savehist-mode 1) ;; Enable saving of command history. - (save-place-mode 1) ;; Enable saving the place in files for easier return. - (winner-mode 1) ;; Enable winner mode to easily undo window configuration changes. - (xterm-mouse-mode 1) ;; Enable mouse support in terminal mode. - (file-name-shadow-mode 1) ;; Enable shadowing of filenames for clarity. + (global-hl-line-mode -1) ;; Disable highlight of the current line + (global-auto-revert-mode 1) ;; Enable global auto-revert mode to keep buffers up to date with their corresponding files. + (indent-tabs-mode -1) ;; Disable the use of tabs for indentation (use spaces instead). + (recentf-mode 1) ;; Enable tracking of recently opened files. + (savehist-mode 1) ;; Enable saving of command history. + (save-place-mode 1) ;; Enable saving the place in files for easier return. + (winner-mode 1) ;; Enable winner mode to easily undo window configuration changes. + (xterm-mouse-mode 1) ;; Enable mouse support in terminal mode. + (file-name-shadow-mode 1) ;; Enable shadowing of filenames for clarity. - ;; Set the default coding system for files to UTF-8. - (modify-coding-system-alist 'file "" 'utf-8) +;;oding system for files to UTF-8. + (modify-coding-system-alist 'file "" 'utf-8) - ;; Add a hook to run code after Emacs has fully initialized. - (add-hook 'after-init-hook -(lambda () - (message "Emacs has fully loaded. This code runs after startup.") + ;; Add a hook to run code after Emacs has fully initialized. + (add-hook 'after-init-hook + (lambda () + (message "Emacs has fully loaded. This code runs after startup.") - ;; Insert a welcome message in the *scratch* buffer displaying loading time and activated packages. - (with-current-buffer (get-buffer-create "*scratch*") -(insert (format - ";; Welcome to Emacs! -;; -;; Loading time : %s -;; Packages : %s -" - (emacs-init-time) - (length (hash-table-keys straight--recipe-cache)))))))) + ;; Insert a welcome message in the *scratch* buffer displaying loading time and activated packages. + (with-current-buffer (get-buffer-create "*scratch*") + (insert (format + ";; Welcome to Emacs! + ;; + ;; Loading time : %s + ;; Packages : %s + " + (emacs-init-time) + (length (hash-table-keys straight--recipe-cache)))))))) (defcustom ek-use-nerd-fonts t "Configuration for using Nerd Fonts Symbols." @@ -731,28 +731,14 @@ completion-category-overrides '((file (styles partial-completion))))) ;; Customi :prefix ",")) (use-package evil - :ensure t - :straight t - :after general - :init - (setq evil-want-integration t - evil-want-keybinding nil - evil-want-C-u-scroll t - evil-want-C-u-delete t - evil-want-C-i-jump nil) - - :config - (evil-set-undo-system 'undo-tree) - (setq evil-leader/in-all-states t - evil-want-fine-undo t) - - (evil-mode 1) +:ensure t +:init +(setq evil-want-integration t) +(setq evil-want-keybinding nil) +(setq evil-want-C-u-delete t) ;; Makes C-u delete on insert mode - (define-key evil-normal-state-map (kbd "SPC") nil) - (define-key evil-motion-state-map (kbd "SPC") nil) - (define-key evil-normal-state-map (kbd ",") nil) - (define-key evil-visual-state-map (kbd ",") nil) - (define-key evil-motion-state-map (kbd ",") nil)) +:config +(evil-mode 1)) (use-package avy :ensure t @@ -776,14 +762,10 @@ completion-category-overrides '((file (styles partial-completion))))) ;; Customi (use-package evil-collection - :defer t - :straight t + :after evil :ensure t - :custom - (evil-collection-want-find-usages-bindings t) - ;; Hook to initialize `evil-collection' when `evil-mode' is activated. - :hook - (evil-mode . evil-collection-init)) + :config + (evil-collection-init)) (use-package evil-surround @@ -1153,12 +1135,12 @@ mode-line-buffer-identification (defvar cashmere/font-height 170) -(when (member "Fragment Mono" (font-family-list)) - (set-face-attribute 'default nil :font "Fragment Mono" :height cashmere/font-height) - (set-face-attribute 'fixed-pitch nil :family "Fragment Mono" :height cashmere/font-height)) +(when (member "Maple Mono NF" (font-family-list)) + (set-face-attribute 'default nil :font "Maple Mono NF" :height cashmere/font-height) + (set-face-attribute 'fixed-pitch nil :family "Maple Mono NF" :height cashmere/font-height)) -(when (member "Open Sans" (font-family-list)) - (set-face-attribute 'variable-pitch nil :family "Open Sans" :height cashmere/font-height)) +(when (member "Maple Mono NF" (font-family-list)) + (set-face-attribute 'variable-pitch nil :family "Maple Mono NF" :height cashmere/font-height)) (use-package mixed-pitch :straight t @@ -50,7 +50,7 @@ (add-to-list 'default-frame-alist '(alpha-background . 90)) #+end_src -* straight.el +* straight.el /commented out/ #+begin_src emacs-lisp ;; (setq straight-check-for-modifications nil) @@ -133,7 +133,7 @@ ;; Configure font settings based on the operating system. ;; Ok, this kickstart is meant to be used on the terminal, not on GUI. ;; But without this, I fear you could start Graphical Emacs and be sad :( - (set-face-attribute 'default nil :family "Fragment Mono" :height 160) + (set-face-attribute 'default nil :family "Maple Mono NF" :height 160) ;; (when (eq system-type 'darwin) ;; Check if the system is macOS. ;; (setq mac-command-modifier 'meta) ;; Set the Command key to act as the Meta key. ;; (set-face-attribute 'default nil :family "Fragment Mono" :height 130)) @@ -165,7 +165,7 @@ (xterm-mouse-mode 1) ;; Enable mouse support in terminal mode. (file-name-shadow-mode 1) ;; Enable shadowing of filenames for clarity. - ;; Set the default coding system for files to UTF-8. +;;oding system for files to UTF-8. (modify-coding-system-alist 'file "" 'utf-8) ;; Add a hook to run code after Emacs has fully initialized. @@ -410,7 +410,7 @@ Disabled because nix is managing the flymake configuration. :ensure nil :defer t :config - (require org-tempo) + (require 'org-tempo) (custom-set-faces '(org-document-title ((t (:height 1.6)))) '(outline-1 ((t (:height 1.25)))) @@ -799,7 +799,7 @@ completion-category-overrides '((file (styles partial-completion))))) ;; Customi eglot-inlay-hints-mode -1) (add-to-list 'eglot-server-programs '(nix-mode . ("nixd")))) #+end_src -** eglot shut up +** eglot-booster #+begin_src emacs-lisp (use-package eglot-booster @@ -912,29 +912,15 @@ completion-category-overrides '((file (styles partial-completion))))) ;; Customi * evil #+begin_src emacs-lisp - (use-package evil - :ensure t - :straight t - :after general - :init - (setq evil-want-integration t - evil-want-keybinding nil - evil-want-C-u-scroll t - evil-want-C-u-delete t - evil-want-C-i-jump nil) - - :config - (evil-set-undo-system 'undo-tree) - (setq evil-leader/in-all-states t - evil-want-fine-undo t) - - (evil-mode 1) +(use-package evil +:ensure t +:init +(setq evil-want-integration t) +(setq evil-want-keybinding nil) +(setq evil-want-C-u-delete t) ;; Makes C-u delete on insert mode - (define-key evil-normal-state-map (kbd "SPC") nil) - (define-key evil-motion-state-map (kbd "SPC") nil) - (define-key evil-normal-state-map (kbd ",") nil) - (define-key evil-visual-state-map (kbd ",") nil) - (define-key evil-motion-state-map (kbd ",") nil)) +:config +(evil-mode 1)) #+end_src @@ -969,33 +955,28 @@ completion-category-overrides '((file (styles partial-completion))))) ;; Customi * evil packages #+begin_src emacs-lisp - - (use-package evil-collection - :defer t - :straight t - :ensure t - :custom - (evil-collection-want-find-usages-bindings t) - ;; Hook to initialize `evil-collection' when `evil-mode' is activated. - :hook - (evil-mode . evil-collection-init)) +(use-package evil-collection + :after evil + :ensure t + :config + (evil-collection-init)) - (use-package evil-surround - :ensure t - :straight t - :after evil-collection - :config - (global-evil-surround-mode 1)) +(use-package evil-surround + :ensure t + :straight t + :after evil-collection + :config + (global-evil-surround-mode 1)) - (use-package evil-matchit - :ensure t - :straight t - :after evil-collection - :config - (global-evil-matchit-mode 1)) +(use-package evil-matchit + :ensure t + :straight t + :after evil-collection + :config + (global-evil-matchit-mode 1)) #+end_src * undo-tree @@ -1420,12 +1401,12 @@ mode-line-buffer-identification #+begin_src emacs-lisp (defvar cashmere/font-height 170) -(when (member "Fragment Mono" (font-family-list)) - (set-face-attribute 'default nil :font "Fragment Mono" :height cashmere/font-height) - (set-face-attribute 'fixed-pitch nil :family "Fragment Mono" :height cashmere/font-height)) +(when (member "Maple Mono NF" (font-family-list)) + (set-face-attribute 'default nil :font "Maple Mono NF" :height cashmere/font-height) + (set-face-attribute 'fixed-pitch nil :family "Maple Mono NF" :height cashmere/font-height)) -(when (member "Open Sans" (font-family-list)) - (set-face-attribute 'variable-pitch nil :family "Open Sans" :height cashmere/font-height)) +(when (member "Maple Mono NF" (font-family-list)) + (set-face-attribute 'variable-pitch nil :family "Maple Mono NF" :height cashmere/font-height)) #+end_src ** mixed pitch fonts (package) |
