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