136 lines
3.7 KiB
EmacsLisp
136 lines
3.7 KiB
EmacsLisp
(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)
|
|
|
|
(setopt show-trailing-whitespace nil)
|
|
(setopt indicate-buffer-boundaries 'left)
|
|
|
|
(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 (load-theme 'modus-vivendi-tinted :no-confirm-loading))
|
|
;; (use-package railscasts-reloaded-theme
|
|
;; :ensure t
|
|
;; :config (load-theme 'railscasts-reloaded :no-confirm-loading))
|
|
;; (use-package doom-themes
|
|
;; :ensure t
|
|
;; :config (load-theme 'doom-palenight :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-vertically] . gered/split-window-vertically)
|
|
([remap split-window-horizontally] . 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 "<"))
|