diff options
| author | cashmere <cashmere@autistici.org> | 2025-12-28 00:34:19 +0100 |
|---|---|---|
| committer | cashmere <cashmere@autistici.org> | 2025-12-28 00:34:19 +0100 |
| commit | 2498d5bb4b28c881318059a7a1fc2ff91ab119c5 (patch) | |
| tree | 261920e590e54e71f77fad144e1c6282ba6bc995 /config.el | |
| parent | 3f5f522b3a07159f9d5d0720b8f5033d9455753c (diff) | |
| download | emacs-2498d5bb4b28c881318059a7a1fc2ff91ab119c5.tar.gz | |
-
Diffstat (limited to 'config.el')
| -rw-r--r-- | config.el | 124 |
1 files changed, 70 insertions, 54 deletions
@@ -5,6 +5,7 @@ ;; (setq gc-cons-threshold 50000000) ;; (setenv "LSP_USE_PLISTS" "true") ;; (setq lsp-use-plists t) + (setq package-enable-at-startup nil) (setq display-graphic-p t) (setq-default mode-line-format t) @@ -60,32 +61,32 @@ (use-package emacs :straight nil :ensure nil - :custom ;; Set custom variables to configure Emacs behavior. + :custom ;; Set custom variables to configure Emacs behavior. (setq modify-coding-system-alist 'file "" 'utf-8) - (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. + (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) @@ -93,25 +94,24 @@ :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))) + "Function for `switch-to-prev-buffer-skip'." + (string-match "\\*[^*]+\\*" (buffer-name buffer))) (setq switch-to-prev-buffer-skip 'skip-these-buffers) -(setq switch-to-prev-buffer-skip-regexp - '("\\*[^*]+\\*" "^magit" "^\\*magit")) + (setq switch-to-prev-buffer-skip-regexp + '("\\*[^*]+\\*" "^magit" "^\\*magit")) ;; 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 150) - ;; (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 "Maple Mono NF" :height 150) + ;; (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'. @@ -119,12 +119,12 @@ ;; 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. + (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 ?│)) - :init ;; Initialization settings that apply before the package is loaded. + :init ;; Initialization settings that apply before the package is loaded. (tool-bar-mode -1) (menu-bar-mode -1) @@ -133,15 +133,15 @@ (add-to-list 'default-frame-alist '(horizontal-scroll-bars . nil)) (set-frame-parameter (selected-frame) 'alpha-background 80) (add-to-list 'default-frame-alist '(alpha-background . 80)) - (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. ;;oding system for files to UTF-8. (modify-coding-system-alist 'file "" 'utf-8) @@ -154,14 +154,15 @@ ;; 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 - " + " ;; 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." :type 'boolean @@ -253,7 +254,16 @@ (erc-join-buffer 'window) ;; Open a new window for joining channels. (erc-hide-list '("JOIN" "PART" "QUIT")) ;; Hide messages for joins, parts, and quits to reduce clutter. (erc-timestamp-format "[%H:%M]") ;; Format for timestamps in messages. - (erc-autojoin-channels-alist '((".*\\.libera\\.chat" "#emacs"))));; Automatically join the #emacs channel on Libera.Chat. + ;; (erc-autojoin-channels-alist '((".*\\.libera\\.chat" "#emacs"))) + );; Automatically join the #emacs channel on Libera.Chat. +(defun run-erc () + (interactive) + (erc-tls :server "irc.cashmere.rs" + :port 6697 + :nick "cashmere" + :user "cashmere/bitlbee" + :password (password-store-get 'soju) + :id 'bitlbee)) (use-package dashboard :ensure t @@ -659,10 +669,15 @@ org-appear-autosubmarkers t)) ;; Show sub- and superscripts (setq org-agenda-inhibit-startup t - org-agenda-use-tag-inheritance nil - org-agenda-dim-blocked-tasks nil - org-startup-indented nil - org-startup-folded 'overview) + org-agenda-use-tag-inheritance nil + org-agenda-dim-blocked-tasks nil + org-startup-indented nil + org-startup-folded 'overview + org-agenda-prefix-format + '((agenda . " %i %?-12t% s") + (todo . " %i ") + (tags . " %i ") + (search . " %i "))) (use-package org-modern :ensure t) @@ -2044,6 +2059,7 @@ completion-category-overrides '((file (styles partial-completion))))) ;; Customi (lambda-themes-set-italic-comments t) (lambda-themes-set-italic-keywords t) (lambda-themes-set-variable-pitch t) + (lambda-themes-set-theme 'dark) :config (load-theme 'lambda-dark)) |
