diff options
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs | 86 |
1 files changed, 54 insertions, 32 deletions
@@ -1,31 +1,27 @@ -(menu-bar-mode -1) -(tool-bar-mode -1) -(scroll-bar-mode -1) -(display-battery-mode t) -(pixel-scroll-precision-mode) -(tab-bar-mode) -(delete-selection-mode 1) -(column-number-mode) -(line-number-mode) -(display-time-mode) - (fset 'yes-or-no-p 'y-or-n-p) (set-face-attribute 'default nil :height 150) -(set-frame-font "Iosevka SS13 Extended" nil t) - ;; Put Emacs auto-save and backup files to /tmp (defconst emacs-tmp-dir (expand-file-name (format "emacs%d" (user-uid)) temporary-file-directory)) (setq + + ;; Visual inhibit-startup-screen t line-spacing 0.2 display-time-format "%a, %d/%m/%Y %H:%M" + default-frame-alist '((font . "Iosevka SS13 Extended")) + shr-max-image-proportion 0.3 + + ;; undo undo-limit 10000000 undo-outer-limit 20000000 + + ;; complete completion-cycle-threshold 5 - shr-max-image-proportion 0.3 - ;; X integration + completion-ignore-case t + + ;; X integration x-select-enable-clipboard t x-select-enable-primary t ring-bell-function 'ignore @@ -78,6 +74,17 @@ " ") frame-title-format '("%b")) +;; UI +(menu-bar-mode -1) +(tool-bar-mode -1) +(scroll-bar-mode -1) +(display-battery-mode t) +(pixel-scroll-precision-mode) +(tab-bar-mode) +(delete-selection-mode 1) +(column-number-mode) +(line-number-mode) +(display-time-mode) ;; activate all thpe packages (in particular autoloads) @@ -95,6 +102,8 @@ (use-package avy :ensure t :config + (setq + avy-timeout-seconds 0.2) (global-set-key (kbd "C-o") 'avy-goto-char-timer) (setf (alist-get ? avy-dispatch-alist) 'avy-action-mark-to-char) (define-key isearch-mode-map (kbd "M-o") 'avy-isearch) @@ -161,7 +170,13 @@ (setf (alist-get ? avy-dispatch-alist) 'avy-action-mark-to-char)) -;; Expand Region +(use-package flymake + :defer t + :hook + ((flymake-mode . + (lambda () + (define-key flymake-mode-map (kbd "C-c ]") 'flymake-goto-next-error) + (define-key flymake-mode-map (kbd "C-c [") 'flymake-goto-previous-error))))) (use-package expand-region :ensure t @@ -175,7 +190,6 @@ (global-set-key (kbd "C-h D") 'devdocs-lookup)) -;; Html (use-package sgml-mode :init (add-to-list 'auto-mode-alist '("\\.njk\\'" . html-mode)) @@ -184,8 +198,17 @@ (setq sgml-basic-offset 8 indent-tabs-mode t))))) +(use-package eldoc + :ensure t + :demand t + :diminish "" + :config + (setq eldoc-print-after-edit t + echo-area-display-truncation-message nil + eldoc-echo-area-prefer-doc-buffer 'maybe + eldoc-echo-area-use-multiline-p nil) + :hook (prog-mode . eldoc-mode)) -;; Markdown (use-package markdown-mode :ensure t :config @@ -222,10 +245,6 @@ (add-to-list 'eglot-server-programs '(nix-mode . ("nil"))) (define-key eglot-mode-map (kbd "C-c r") 'eglot-rename) (define-key eglot-mode-map (kbd "C-c o") 'eglot-code-actions) - (define-key eglot-mode-map (kbd "C-c h") 'eldoc) - (set 'eldoc-print-after-edit t) - (global-eldoc-mode t) - (setq eldoc-echo-area-prefer-doc-buffer t) :hook (nix-mode . eglot-ensure) (go-mode . eglot-ensure)) @@ -239,7 +258,13 @@ (use-package erc :config (setq erc-autojoin-channels-alist - '(("Libera.Chat" "#emacs" "#permacomputing" "oldcomputerchallenge" "lobsters" "netbsd"))) + '(("Libera.Chat" + "#emacs" + "#permacomputing" + "#oldcomputerchallenge" + "#lobsters" + "#netbsd" + "#erc"))) (global-set-key "\C-cef" @@ -296,26 +321,21 @@ :hook ((org-mode . auto-save-mode)) (org-mode . org-indent-mode) + (org-mode . flyspell-mode) (org-mode . visual-line-mode) (org-mode . variable-pitch-mode)) -;; Magit (use-package magit - :ensure t - :init - (global-set-key (kbd "C-c g") 'magit)) + :ensure t) (use-package magit-extras) -;; Yasnippet (use-package yasnippet :ensure t :init (yas-global-mode 1)) - -;; Mu4e (defun marc/set-msmtp-account () (if (message-mail-p) (save-excursion @@ -335,6 +355,8 @@ (use-package mu4e :ensure nil :load-path "/usr/share/emacs/site-lisp/mu4e/" + :hook + ((message-mode . flyspell-mode)) :config ;; This is set to 't' to avoid mail syncing issues when using mbsync @@ -382,7 +404,7 @@ (mu4e-trash-folder . "/home/Trash") (mu4e-sent-messages-behavior . sent) -ppp (mu4e-maildir-shortcuts . + (mu4e-maildir-shortcuts . (("/home/INBOX" . ?i) ("/home/Archive/Done" . ?d) ("/home/Archive" . ?a) @@ -514,7 +536,7 @@ ppp (mu4e-maildir-shortcuts . '("~/personal-db/notes/carving-my-own-road.org" "/home/mccd/personal-db/notes/emacs-teaches.org" "/home/mccd/personal-db/notes/agency-and-tech.org" "/home/mccd/personal-db/notes/log.org" "/home/mccd/builds/sustainably/piva.org" "/home/mccd/builds/comma.directory/comma.org" "/home/mccd/personal-db/notes/frugal.org" "/home/mccd/personal-db/notes/inbox.org" "/home/mccd/personal-db/notes/emacs.org" "/home/mccd/personal-db/todo.org")) '(org-fold-core-style 'overlays) '(package-selected-packages - '(nix-mode nix-ts-mode avy pdf-tools elfeed-protocol lem yasnippet-snippets elfeed yasnippet smartparens markdown-mode mastodon tldr almost-mono-themes rec-mode magit go-mode expand-region devdocs)) + '(web-mode flycheck nix-mode nix-ts-mode avy pdf-tools elfeed-protocol lem yasnippet-snippets elfeed yasnippet smartparens markdown-mode mastodon tldr almost-mono-themes rec-mode magit go-mode expand-region devdocs)) '(tab-bar-format '(tab-bar-separator tab-bar-format-align-right tab-bar-format-global)) '(yank-from-kill-ring-rotate t)) |