From b71ca523e221c0bad9ea3af4d1d170f230786cf5 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Thu, 27 Jul 2023 21:45:03 +0100 Subject: Add more configuration to make defaults nicer --- init.el | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 68 insertions(+), 18 deletions(-) diff --git a/init.el b/init.el index 4827bf9..1f5da61 100644 --- a/init.el +++ b/init.el @@ -131,6 +131,12 @@ Should be one of `:white-split', `:modified' or `:default'") (use-package emacs :custom (blink-matching-paren nil) + (completion-category-defaults nil) + (completion-ignore-case t) + (completion-styles '(substring partial-completion)) + (read-buffer-completion-ignore-case t) + (read-file-name-completion-ignore-case t) + (frame-resize-pixelwise t) :init ;; Remove any warnings from the async compilation. This was bothersome ;; because it would make the warning buffer appear whenever there were any. @@ -238,6 +244,10 @@ Should be one of `:white-split', `:modified' or `:default'") (tool-bar-mode -1) (scroll-bar-mode -1) (column-number-mode 1) + (electric-indent-mode -1) + + (pixel-scroll-precision-mode +1) + (global-hl-line-mode +1) (global-display-fill-column-indicator-mode) @@ -259,7 +269,7 @@ Should be one of `:white-split', `:modified' or `:default'") (set-face-attribute 'fixed-pitch nil :family "Iosevka YMHG" :weight 'semi-bold)) (add-to-list 'mode-line-misc-info - '(t ("[t:" (:eval (alist-get 'name (tab-bar--current-tab))) "] "))) + '(t ("[" (:eval (alist-get 'name (tab-bar--current-tab))) "] "))) ;; Mac configuration (when ymh/macos-p @@ -280,9 +290,9 @@ Should be one of `:white-split', `:modified' or `:default'") :custom (display-time-24hr-format t) (display-time-default-load-average nil) - (display-time-day-and-date t) + (display-time-day-and-date nil) :init - (display-time-mode 1)) + (display-time-mode +1)) (use-package whitespace :config @@ -514,6 +524,33 @@ https://yannherklotz.com")) (modus-themes-load-theme 'modus-operandi-tinted) (ymh-modus-theme-apply-customisations)) +(use-package catppuccin-theme + :ensure t + :custom + (catppuccin-flavor 'mocha) + :init + (defun ymh/catppuccin-fix-colours () + (let ((c '((class color) + (min-colors 256))) + (mod-col (if (eq catppuccin-flavor 'latte) + #'catppuccin-lighten + #'catppuccin-darken))) + (custom-set-faces + `(proof-locked-face ((,c :background ,(funcall mod-col (catppuccin-get-color 'teal) 80) :extend t))) + `(proof-queue-face ((,c :background ,(funcall mod-col (catppuccin-get-color 'maroon) 80) :extend t))) + `(proof-warning-face ((,c :foreground ,(catppuccin-get-color 'yellow)))) + `(coq-solve-tactics-face ((,c :foreground ,(catppuccin-get-color 'red)))) + `(coq-cheat-face ((,c :foreground ,(catppuccin-get-color 'red) + :box (:line-width -1 :color ,(catppuccin-get-color 'red) + :style nil))))))) + (defun ymh/catppuccin-toggle () + (interactive) + (if (eq catppuccin-flavor 'latte) + (setq catppuccin-flavor 'mocha) + (setq catppuccin-flavor 'latte)) + (ymh/catppuccin-fix-colours) + (catppuccin-reload))) + (use-package pass :ensure t :bind (:map ymh-map @@ -529,6 +566,7 @@ https://yannherklotz.com")) (use-package org :custom + (org-reverse-note-order t) (org-adapt-indentation nil) (org-attach-auto-tag "attach") (org-confirm-babel-evaluate nil) @@ -625,14 +663,13 @@ https://yannherklotz.com")) (use-package org-agenda :bind ("C-c a" . org-agenda) :custom - (org-agenda-files (cons (ymh/expand-bib-file "reading_list.org") - (mapcar #'ymh/expand-org-file - (list "inbox.org" - "main.org" - "tickler.org" - "projects.org" - "diary.org" - (format-time-string "%Y-%m.org"))))) + (org-agenda-files (mapcar #'ymh/expand-org-file + (list "inbox.org" + "main.org" + "tickler.org" + "projects.org" + "diary.org" + (format-time-string "%Y-%m.org")))) (org-agenda-custom-commands '(("w" "At work" tags-todo "@work" ((org-agenda-overriding-header "Work"))) @@ -760,11 +797,6 @@ https://yannherklotz.com")) (use-package vertico :ensure t - :custom - (read-file-name-completion-ignore-case t) - (read-buffer-completion-ignore-case t) - (completion-ignore-case t) - (completion-category-defaults nil) :init (vertico-mode 1)) @@ -910,7 +942,8 @@ https://yannherklotz.com")) (if ymh/macos-p (add-to-list 'ebib-file-associations '("pdf" . "open")) (add-to-list 'ebib-file-associations '("pdf" . nil))) - (add-to-list 'ebib-citation-commands '(org-mode (("ref" "[cite:@%(%K%,)]")))) + (add-to-list 'ebib-citation-commands '(org-mode (("ref" "[cite:@%(%K%,)]") + ("text" "[cite/text:@%(%K%,)]")))) (add-to-list 'ebib-citation-commands '(context-mode (("cite" "\\cite[%(%K%,)]") ("authoryear" "\\cite[authoryear][%(%K%,)]") ("authoryears" "\\cite[authoryears][%(%K%,)]") @@ -1363,7 +1396,24 @@ https://yannherklotz.com")) "ymh-titleframed" "ymh-first-noheader"))))) -(use-package dune :ensure t) +(use-package dune + :ensure t) + +(use-package spacious-padding + :ensure t + :config + (spacious-padding-mode 1)) + +(use-package avy + :ensure t + :bind (;; The char-timer is a useful command that lets you type as many + ;; prefixes for the place that you want to jump to as you want, and + ;; after a timeout will either go to that place if it is unique, or + ;; give avy characters for each duplicate location. + ("M-o" . avy-goto-char-timer)) + :custom + ;; Add colemak friendly keys for avy to use. + (avy-keys '(97 114 115 116 100 104 110 101 105 111))) ;; Collect emacs statistics and run `emacs-gc-stats-save-session' when ready in ;; ~3 weeks. -- cgit