;;; init.el -*- lexical-binding: t; -*- (setq inhibit-startup-message t) (scroll-bar-mode -1) (tool-bar-mode -1) (tooltip-mode -1) (set-fringe-mode 10) (menu-bar-mode -1) (blink-cursor-mode -1) (column-number-mode +1) (if (string-equal (system-name) "chris-linuxlaptop") (set-face-attribute 'default nil :font "VictorMono Nerd Font" :height 240) (set-face-attribute 'default nil :font "VictorMono Nerd Font" :height 120)) (setq display-line-numbers-type 'relative) (global-set-key (kbd "") 'keyboard-escape-quit) (defvar bootstrap-version) (let ((bootstrap-file (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) (bootstrap-version 5)) (unless (file-exists-p bootstrap-file) (with-current-buffer (url-retrieve-synchronously "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el" 'silent 'inhibit-cookies) (goto-char (point-max)) (eval-print-last-sexp))) (load bootstrap-file nil 'nomessage)) (setq straight-use-package-by-default t) (straight-use-package 'use-package) (use-package command-log-mode) (use-package all-the-icons) (use-package doom-modeline :ensure t :init (doom-modeline-mode 1) (setq doom-modeline-height 35 doom-modeline-bar-width 3 all-the-icons-scale-factor 0.9)) (use-package doom-themes :ensure t :init (load-theme 'doom-snazzy t)) (use-package rainbow-delimiters :hook (prog-mode . rainbow-delimiters-mode)) (use-package which-key :init (which-key-mode) :config (setq which-key-idle-delay 0.3)) (use-package evil :init (setq evil-want-integration t evil-want-keybinding nil evil-want-C-i-jump nil evil-want-C-u-scroll t evil-want-C-u-delete t) :config (evil-mode +1)) (use-package evil-collection :after evil :config (evil-collection-init)) (use-package general :init (general-evil-setup) :config (general-create-definer chris/leader-keys :keymaps '(normal visual emacs) :prefix "SPC") (chris/leader-keys "t" '(:ignore t :which-key "toggle") "f" '(:ignore t :which-key "file") "w" '(:ignore t :which-key "window") "tt" '(consult-theme :which-key "choose theme") "ff" '(find-file :which-key "find file") "fs" '(save-buffer :which-key "save") "ww" '(other-window :which-key "other window") )) (use-package evil-escape :after evil :init (evil-escape-mode +1) :config (setq evil-escape-key-sequence "fd")) (use-package prescient :config (prescient-persist-mode +1)) (use-package consult) ;; Enable richer annotations using the Marginalia package (use-package marginalia :bind (:map minibuffer-local-map ("C-M-a" . marginalia-cycle) ;; :map embark-general-map ;; ("A" . marginalia-cycle) ) ;; The :init configuration is always executed (Not lazy!) :init ;; Must be in the :init section of use-package such that the mode gets ;; enabled right away. Note that this forces loading the package. (marginalia-mode) ;; When using Selectrum, ensure that Selectrum is refreshed when cycling annotations. (advice-add #'marginalia-cycle :after (lambda () (when (bound-and-true-p selectrum-mode) (selectrum-exhibit)))) ;; Prefer richer, more heavy, annotations over the lighter default variant. (setq marginalia-annotators '(marginalia-annotators-heavy marginalia-annotators-light nil))) (use-package helpful :config ) (use-package org :config (setq org-startup-indented t) (defun chris/org-babel-tangle-config () (when (string-equal (buffer-file-name) (expand-file-name "~/.personal-emacs/init.org")) (let ((org-confirm-babel-evaluate nil)) (org-babel-tangle)))) (add-hook 'org-mode-hook (lambda () (add-hook 'after-save-hook #'chris/org-babel-tangle-config))))