From fa738a75d508a68db860dd748c819e760636da0f Mon Sep 17 00:00:00 2001 From: Marc Coquand Date: Mon, 2 Dec 2024 10:01:08 +0200 Subject: . --- home/dots/.emacs | 100 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 54 insertions(+), 46 deletions(-) (limited to 'home') diff --git a/home/dots/.emacs b/home/dots/.emacs index 3d61872..b9a1d2a 100644 --- a/home/dots/.emacs +++ b/home/dots/.emacs @@ -1,7 +1,6 @@ -;; -*- lexical-binding: t; -*- +;;; init.el --- Init -*- no-byte-compile: t; lexical-binding: t; -*- (add-to-list 'load-path "~/.emacs.d/elisp") (add-to-list 'load-path "~/.emacs.d/site-lisp") -(setq use-package-enable-imenu-support t) (setq package-list '(avy @@ -32,12 +31,7 @@ pinentry tldr transpose-frame - ws-butler) - package-archives '(("elpa" . "https://elpa.gnu.org") - ("gnu" . "http://elpa.gnu.org/packages/") - ("melpa" . "https://melpa.org/packages/") - ("non-gnu" . "https://elpa.nongnu.org/nongnu/") - ("melpa-stable" . "https://stable.melpa.org/packages/"))) + ws-butler)) (package-initialize) @@ -135,29 +129,21 @@ (use-package emacs :init - (set-language-environment 'utf-8) - (set-terminal-coding-system 'utf-8) - (set-keyboard-coding-system 'utf-8) - (set-selection-coding-system 'utf-8) - (prefer-coding-system 'utf-8) - + (set-scroll-bar-mode nil) (fset 'yes-or-no-p 'y-or-n-p) - (menu-bar-mode -1) - (tool-bar-mode -1) (setq-default fill-column 80 line-spacing 10 cursor-type 'box cursor-in-non-selected-windows nil frame-title-format '("%b")) :custom + (scroll-bar-mode nil) (highlight-nonselected-windows nil) (default-frame-alist '((font . "Iosevka SS13 Extended") (height . 150) (line-spacing . 0.5))) (undo-limit 10000000) (undo-outer-limit 20000000) - (locale-coding-system 'utf-8) - (buffer-file-coding-system 'utf-8-unix) (create-lockfiles nil) (idle-update-delay 1.0) (auto-save-list-file-prefix @@ -200,6 +186,7 @@ (scroll-preserve-screen-position 1) (scroll-margin 0) (blink-cursor-mode -1) + (read-process-output-max (* 512 1024)) (x-stretch-cursor t) (tab-always-indent 'complete) (text-mode-ispell-word-completion nil) @@ -207,7 +194,8 @@ (use-package vc-hooks :custom - (vc-make-backup-files nil)) + (vc-make-backup-files nil) + (vc-follow-symlinks t)) (use-package tab-bar :bind @@ -243,25 +231,30 @@ (("C-x C-f" . find-file-at-point)) :init (ffap-bindings) - :config - (setq ffap-require-prefix nil)) + :custom + (ffap-machine-p-known 'reject) + (ffap-require-prefix nil)) (use-package tldr :ensure t :defer t) +(use-package mouse + :custom + (mouse-yank-at-point t)) + (use-package time :init (display-time-mode) - :config - (setq display-time-format "%a, %F %R")) + :custom + (display-time-format "%a, %F %R")) (use-package geiser :ensure t :init (with-eval-after-load 'geiser-guile - (add-to-list 'geiser-guile-load-path "~/dev/nonguix") - (keymap-set geiser-mode-map "C-." nil))) + (add-to-list 'geiser-guile-load-path "~/dev/nonguix"))) + ;;(keymap-set geiser-mode-map "C-." nil))) (use-package corfu :defer t @@ -293,10 +286,6 @@ (add-to-list 'dabbrev-ignored-buffer-modes 'pdf-view-mode) (add-to-list 'dabbrev-ignored-buffer-modes 'tags-table-mode)) -(use-package scroll-bar - :init - (scroll-bar-mode -1)) - (use-package delsel :init (delete-selection-mode)) @@ -335,17 +324,23 @@ (version-control t) ; Use version numbers for backup files (kept-new-versions 10) (kept-old-versions 10) -;;; Auto revert - ;; Auto-revert in Emacs is a feature that automatically updates the - ;; contents of a buffer to reflect changes made to the underlying file - ;; on disk. - (revert-without-query (list ".") ; Do not prompt - auto-revert-stop-on-user-input nil - auto-revert-verbose t) + + ;; acceptable since it will redirect you to the existing buffer regardless. + (find-file-suppress-same-file-warnings t) + + ;; Resolve symlinks when opening files, so that any operations are conducted + ;; from the file's true directory (like `find-file'). + (find-file-visit-truename t) + + ;; Skip confirmation prompts when creating a new file or buffer + (confirm-nonexistent-file-or-buffer nil)) + +(use-package uniquify + :custom + (uniquify-buffer-name-style 'forward)) + - (auto-save-default t) - (auto-save-include-big-deletions t)) (use-package direnv :ensure t @@ -358,6 +353,7 @@ :defer t :custom (completion-cycle-threshold 5) + (enable-recursive-minibuffers t) (completion-ignore-case t)) (use-package pass @@ -677,7 +673,6 @@ (define-key flymake-mode-map (kbd "C-c [") 'flymake-goto-prev-error))))) (use-package expand-region - :defer t :ensure t :bind ("C-." . er/expand-region) @@ -717,7 +712,8 @@ :bind (:map html-mode-map ("M-" . nil) - ("M-" . nil)) + ("M-o" . nil) + ("M-i" . nil)) :hook (javascript-mode . (lambda ((interactive) (setq-local tab-width 2) @@ -750,6 +746,7 @@ (eldoc-print-after-edit nil) (eldoc-echo-area-display-truncation-message t) (eldoc-echo-area-prefer-doc-buffer t) + (eldoc-documentation-strategy 'eldoc-documentation-compose-eagerly) (eldoc-echo-area-use-multiline-p 'truncate-sym-name-if-fit)) (use-package markdown-mode @@ -1128,7 +1125,17 @@ ("" . org-agenda-switch-to-narrowed-subtree))) (use-package autorevert - :diminish auto-revert-mode) + :diminish auto-revert-mode + :custom + ;;; Auto revert + ;; Auto-revert in Emacs is a feature that automatically updates the + ;; contents of a buffer to reflect changes made to the underlying file + ;; on disk. + (revert-without-query (list ".")) ; Do not prompt + (auto-revert-stop-on-user-input nil) + (auto-revert-verbose t) + (auto-save-default t) + (auto-save-include-big-deletions t)) (use-package appt :after (org-agenda dbus) @@ -1164,10 +1171,12 @@ (use-package magit :ensure t - :defer t + :demand t + :bind + (("C-x p m" . magit-project-status) + :map project-prefix-map + ("m" . magit-project-status)) :config - (global-key-binding (kbd "C-x p m") 'magit-project-status) - (define-key project-prefix-map (kbd "m") 'magit-project-status) (add-to-list 'project-switch-commands '(magit-project-status "magit"))) (use-package skeleton @@ -1292,8 +1301,7 @@ (message-sendmail-extra-arguments '("--read-envelope-from")) (message-send-mail-function 'message-send-mail-with-sendmail) (message-sendmail-envelope-from 'header) - (mail-user-agent 'message-user-agent)) - + (mail-user-agent 'message-user-agent) (message-kill-buffer-on-exit t)) (use-package sendmail -- cgit v1.2.3