style(emacs): format config.org
Some checks failed
Check Formatting of Files / Check-Formatting (push) Has been cancelled

This commit is contained in:
Price Hiller 2024-07-09 23:26:19 -05:00
parent c6baf97dd9
commit 824adba95b
Signed by: Price
GPG Key ID: C3FADDE7A8534BEB

View File

@ -6,7 +6,7 @@
* Auto Compile * Auto Compile
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package auto-compile (use-package auto-compile
:custom :custom
(load-prefer-newer t) (load-prefer-newer t)
:defer nil :defer nil
@ -23,48 +23,45 @@
** Font Settings ** Font Settings
#+begin_src emacs-lisp #+begin_src emacs-lisp
(set-face-attribute 'default nil :family "Fira Code" :height 130) (set-face-attribute 'default nil :family "Fira Code" :height 130)
#+end_src #+end_src
** Splash Screen
** Splash Screen
Remove splash screen and use a *scratch* buffer instead Remove splash screen and use a *scratch* buffer instead
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq inhibit-startup-message t (setq inhibit-startup-message t
inhibit-startup-echo-area-message t) inhibit-startup-echo-area-message t)
#+end_src #+end_src
** Line Numbers ** Line Numbers
Default to enabling line numbers in all buffers Default to enabling line numbers in all buffers
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq display-line-numbers-type 'relative (setq display-line-numbers-type 'relative
column-number-mode t) column-number-mode t)
(global-display-line-numbers-mode t) (global-display-line-numbers-mode t)
#+end_src #+end_src
** Improved Tabs/Indentation ** Improved Tabs/Indentation
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq-default indent-tabs-mode nil) (setq-default indent-tabs-mode nil)
(setq-default tab-width 4) (setq-default tab-width 4)
#+end_src #+end_src
** Improved default visuals ** Improved default visuals
#+begin_src emacs-lisp #+begin_src emacs-lisp
(menu-bar-mode -1) (menu-bar-mode -1)
(scroll-bar-mode -1) (scroll-bar-mode -1)
(tool-bar-mode -1) (tool-bar-mode -1)
(tooltip-mode t) (tooltip-mode t)
(setq visible-bell nil) (setq visible-bell nil)
(global-hl-line-mode t) (global-hl-line-mode t)
(blink-cursor-mode 0) (blink-cursor-mode 0)
#+end_src #+end_src
** Improve yes or no prompt ** Improve yes or no prompt
#+begin_src emacs-lisp #+begin_src emacs-lisp
(fset 'yes-or-no-p 'y-or-n-p) (fset 'yes-or-no-p 'y-or-n-p)
#+end_src #+end_src
* Appearance / Themeing * Appearance / Themeing
@ -72,7 +69,7 @@ Default to enabling line numbers in all buffers
** Kanagawa Theme ** Kanagawa Theme
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package kanagawa-theme (use-package kanagawa-theme
:ensure t :ensure t
:config :config
(load-theme 'kanagawa t)) (load-theme 'kanagawa t))
@ -80,7 +77,7 @@ Default to enabling line numbers in all buffers
* Evil Mode * Evil Mode
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package evil (use-package evil
:defer nil :defer nil
:custom :custom
(evl-kbd-macro-suppress-motion-error t) (evl-kbd-macro-suppress-motion-error t)
@ -96,28 +93,26 @@ Default to enabling line numbers in all buffers
:config :config
(evil-mode 1)) (evil-mode 1))
#+end_src #+end_src
* General.el * General.el
Used for keybindings Used for keybindings
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package general (use-package general
:ensure (:wait t) :ensure (:wait t)
:after evil :after evil
:demand t) :demand t)
(general-create-definer key-leader (general-create-definer key-leader
:states 'normal :states 'normal
:keymaps 'override :keymaps 'override
:prefix "SPC") :prefix "SPC")
;; Make hitting escape work more like vim ;; Make hitting escape work more like vim
(general-def (general-def
"<escape>" #'keyboard-escape-quit) "<escape>" #'keyboard-escape-quit)
#+end_src #+end_src
* Which Key * Which Key
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package which-key (use-package which-key
:defer nil :defer nil
:config :config
:general :general
@ -134,39 +129,37 @@ Used for keybindings
* Auto Revert * Auto Revert
#+begin_src emacs-lisp #+begin_src emacs-lisp
(global-auto-revert-mode t) (global-auto-revert-mode t)
#+end_src #+end_src
* Treesitter * Treesitter
** Auto setup ** Auto setup
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package treesit-auto (use-package treesit-auto
:custom :custom
(treesit-auto-install 'prompt) (treesit-auto-install 'prompt)
:config :config
(treesit-auto-add-to-auto-mode-alist 'all) (treesit-auto-add-to-auto-mode-alist 'all)
(global-treesit-auto-mode)) (global-treesit-auto-mode))
#+end_src #+end_src
** Nix Integration
** Nix Integration
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package nix-ts-mode (use-package nix-ts-mode
:mode "\\.nix\\'") :mode "\\.nix\\'")
#+end_src #+end_src
* Completion * Completion
** Orderless w/ Hotfuzz ** Orderless w/ Hotfuzz
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package hotfuzz (use-package hotfuzz
:ensure (:host github :ensure (:host github
:depth 1 :depth 1
:repo "axelf4/hotfuzz" :repo "axelf4/hotfuzz"
:pre-build (("cmake" "-DCMAKE_C_FLAGS='-O3 -march=native'" ".") ("cmake" "--build" ".")))) :pre-build (("cmake" "-DCMAKE_C_FLAGS='-O3 -march=native'" ".") ("cmake" "--build" "."))))
(use-package orderless (use-package orderless
:after hotfuzz :after hotfuzz
:demand t :demand t
:config :config
@ -191,20 +184,6 @@ Used for keybindings
(derived-mode-p 'eshell-mode)) (derived-mode-p 'eshell-mode))
(string-match-p "\\`\\.." word)) (string-match-p "\\`\\.." word))
`(orderless-regexp . ,(concat "\\." (substring word 1) (+orderless--consult-suffix)))))) `(orderless-regexp . ,(concat "\\." (substring word 1) (+orderless--consult-suffix))))))
(defun flex-if-twiddle (pattern _index _total)
(when (string-suffix-p "~" pattern)
`(orderless-flex . ,(substring pattern 0 -1))))
(defun first-initialism (pattern index _total)
(if (= index 0) 'orderless-initialism))
(defun not-if-bang (pattern _index _total)
(cond
((equal "!" pattern)
#'ignore)
((string-prefix-p "!" pattern)
`(orderless-not . ,(substring pattern 1)))))
(setq (setq
completion-ignore-case t completion-ignore-case t
completion-styles '(hotfuzz orderless basic) completion-styles '(hotfuzz orderless basic)
@ -213,6 +192,10 @@ Used for keybindings
orderless-component-separator #'orderless-escapable-split-on-space orderless-component-separator #'orderless-escapable-split-on-space
orderless-style-dispatchers (list #'+orderless-consult-dispatch orderless-style-dispatchers (list #'+orderless-consult-dispatch
#'orderless-affix-dispatch) #'orderless-affix-dispatch)
completion-category-overrides '((file (styles partial-completion))
(command (styles +orderless-with-initialism))
(variable (styles +orderless-with-initialism))
(symbol (styles +orderless-with-initialism)))
orderless-matching-styles orderless-matching-styles
'(orderless-prefixes '(orderless-prefixes
orderless-initialism orderless-initialism
@ -221,9 +204,8 @@ Used for keybindings
#+end_src #+end_src
** Corfu ** Corfu
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package corfu (use-package corfu
:custom :custom
(corfu-min-width 60) (corfu-min-width 60)
(corfu-max-width corfu-min-width) (corfu-max-width corfu-min-width)
@ -255,7 +237,7 @@ Used for keybindings
** Cape ** Cape
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package cape (use-package cape
:ensure (:host github :ensure (:host github
:repo "minad/cape" :repo "minad/cape"
:depth 1) :depth 1)
@ -275,9 +257,8 @@ Used for keybindings
#+end_src #+end_src
** Marginalia ** Marginalia
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package marginalia (use-package marginalia
; :ensure (:host github ; :ensure (:host github
; :depth 1 ; :depth 1
; :repo "minad/marginalia") ; :repo "minad/marginalia")
@ -292,9 +273,8 @@ Used for keybindings
#+end_src #+end_src
** Completion Icons ** Completion Icons
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package kind-icon (use-package kind-icon
:ensure t :ensure t
:after corfu nerd-icons :after corfu nerd-icons
:custom :custom
@ -341,7 +321,7 @@ Used for keybindings
:config :config
(add-to-list 'corfu-margin-formatters #'kind-icon-margin-formatter)) (add-to-list 'corfu-margin-formatters #'kind-icon-margin-formatter))
(use-package nerd-icons-completion (use-package nerd-icons-completion
:after marginalia :after marginalia
:config :config
(nerd-icons-completion-mode) (nerd-icons-completion-mode)
@ -349,9 +329,8 @@ Used for keybindings
#+end_src #+end_src
** Vertico ** Vertico
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package vertico (use-package vertico
:general :general
(:keymaps '(normal insert visual motion) (:keymaps '(normal insert visual motion)
"M-." #'vertico-repeat) ; Perfectly return to the state of the last Vertico minibuffer usage "M-." #'vertico-repeat) ; Perfectly return to the state of the last Vertico minibuffer usage
@ -410,10 +389,30 @@ Used for keybindings
(vertico-mouse-mode)) (vertico-mouse-mode))
#+end_src #+end_src
* Modeline ** Consult
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package doom-modeline (use-package consult
:init
(advice-add #'register-preview :override #'consult-register-window)
(setq register-preview-delay 0.5
register-preview-function #'consult-register-format
xref-show-xrefs-function #'consult-xref
xref-show-definitions-function #'consult-xref
consult-narrow-key "<"
completion-in-region-function #'consult-completion-in-region)
:general
(key-leader
:states 'normal
"c" '(nil :which-key "Consult")
"c b" '(consult-buffer :which-key "Consult: Buffers")
"c f" '(consult-fd :which-key "Consult: Find File")
"c r" '(consult-recent-file :which-key "Consult: Recent Files")))
#+end_src
* Modeline
#+begin_src emacs-lisp
(use-package doom-modeline
:custom :custom
(doom-modeline-height 25) (doom-modeline-height 25)
(doom-modeline-bar-width 5) (doom-modeline-bar-width 5)
@ -437,9 +436,17 @@ Used for keybindings
(doom-modeline-mode)) (doom-modeline-mode))
#+end_src #+end_src
* Save Hist
#+begin_src emacs-lisp
(use-package savehist
:ensure nil
:init
(savehist-mode))
#+end_src
* Org Mode * Org Mode
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package org (use-package org
:hook (org-mode . org-indent-mode) :hook (org-mode . org-indent-mode)
:ensure nil :ensure nil
:defer nil :defer nil
@ -451,7 +458,7 @@ Used for keybindings
(org-agenda-files '("~/Notes" "~/Git/College")) (org-agenda-files '("~/Notes" "~/Git/College"))
(org-hide-emphasis-markers t)) (org-hide-emphasis-markers t))
(use-package org-modern (use-package org-modern
:after org :after org
:config :config
(global-org-modern-mode)) (global-org-modern-mode))