(column-number-mode 1) (line-number-mode 1) (add-hook 'prog-mode-hook 'display-line-numbers-mode) (setopt display-line-numbers-width 3) (add-hook 'text-mode-hook 'visual-line-mode) (add-hook 'text-mode-hook 'hl-line-mode) (add-hook 'prog-mode-hook 'hl-line-mode) (setopt x-underline-at-descent-line nil) (setopt switch-to-buffer-obey-display-actions 1) ; help buffers always open in the same window. mainly this helps make it so ; opening links in help buffers doesn't cause them to open in new windows ; each time. ugh! ; TODO: admittedly this makes initially opening help slightly more annoying as ; the first help buffer will *also* open in the same window. (add-to-list 'display-buffer-alist '("*Help*" display-buffer-same-window)) (setopt show-trailing-whitespace nil) (setopt indicate-buffer-boundaries 'left) (setq confirm-nonexistent-file-or-buffer nil) (setq use-short-answers t) (unless (display-graphic-p) (xterm-mouse-mode 1)) (when (display-graphic-p) (pixel-scroll-precision-mode 1)) (context-menu-mode 1) (setopt tab-bar-show 1) (let ((mono-spaced-font "Cascadia Code") (proportionately-spaced-font "Sans")) (set-face-attribute 'default nil :family mono-spaced-font :height 120) (set-face-attribute 'fixed-pitch nil :family mono-spaced-font :height 1.0) (set-face-attribute 'variable-pitch nil :family proportionately-spaced-font :height 1.0)) (use-package modus-themes :ensure t :config (setq modus-themes-italic-constructs t) (setq modus-themes-bold-constructs t) (setq modus-themes-common-palette-overrides '( ;; highlight numbers!!!!!! (number yellow-warmer) )) (load-theme 'modus-vivendi-tinted :no-confirm-loading)) ;; NOTE: Easy way to install the necessary nerd-icons fonts for this to work: ;; M-x nerd-icons-install-fonts (use-package nerd-icons :ensure t) (use-package nerd-icons-completion :ensure t :after marginalia :config (add-hook 'marginalia-mode-hook #'nerd-icons-completion-marginalia-setup)) (use-package nerd-icons-corfu :ensure t :after corfu :config (add-to-list 'corfu-margin-formatters #'nerd-icons-corfu-formatter)) (use-package nerd-icons-dired :ensure t :hook (dired-mode . nerd-icons-dired-mode)) (use-package doom-modeline :ensure t :init (doom-modeline-mode 1)) (use-package rainbow-delimiters :ensure t :hook (prog-mode . rainbow-delimiters-mode)) (use-package which-key :ensure t :init (which-key-mode) :diminish which-key-mode :config (setq which-key-idle-delay 1)) (use-package helpful :ensure t :bind (([remap describe-function] . helpful-callable) ([remap describe-variable] . helpful-variable) ([remap describe-key] . helpful-key) ([remap describe-command] . helpful-command))) (use-package kind-icon :ensure t :if (display-graphic-p) :after corfu :config (add-to-list 'corfu-margin-formatters #'kind-icon-margin-formatter)) (use-package window :bind (([remap split-window-below] . gered/split-window-vertically) ([remap split-window-right] . gered/split-window-horizontally) ("M-o" . other-window) ("M-p" . gered/switch-to-previous-buffer) ("M-}" . next-buffer) ("M-{" . previous-buffer)) :init (defun gered/split-window-vertically () (interactive) (split-window-vertically) (other-window 1 nil) (switch-to-next-buffer)) (defun gered/split-window-horizontally () (interactive) (split-window-horizontally) (other-window 1 nil) (switch-to-next-buffer)) (defun gered/switch-to-previous-buffer () (interactive) (switch-to-buffer (other-buffer (current-buffer) 1)))) (use-package consult :ensure t :bind (([remap switch-to-buffer] . consult-buffer) ([remap yank-pop] . consult-yank-pop) ([remap isearch-forward] . consult-line) ("C-c M-x" . consult-mode-command) ("M-s d" . consult-find) ("M-s r" . consult-ripgrep) ("M-s l" . consult-line) ("M-s s" . consult-line) ("M-s L" . consult-line-multi) ("M-s o" . consult-outline) :map isearch-mode-map ("M-e" . consult-isearch-history) ("M-s e" . consult-isearch-history) ("M-s l" . consult-line) ("M-s L" . consult-line-multi)) :config (setq consult-narrow-key "<")) (use-package popper :ensure t :bind (("C-`" . popper-toggle) ("M-`" . popper-cycle) ("C-M-`" . popper-toggle-type)) :init (setq popper-reference-buffers '("\\*Messages\\*" "Output\\*$" "\\*Async Shell Command\\*" "^\\*Cargo" ;;help-mode compilation-mode)) (popper-mode t) (popper-echo-mode t))