updat
This commit is contained in:
parent
59f4251ed8
commit
71839c378c
18
.gitignore
vendored
18
.gitignore
vendored
|
@ -1,13 +1,5 @@
|
||||||
.cache/
|
*
|
||||||
auto-save-list/
|
!.gitignore
|
||||||
eln-cache/
|
!config.org
|
||||||
elpa/
|
!early-init.el
|
||||||
elpaca/
|
!init.el
|
||||||
recentf
|
|
||||||
transient/
|
|
||||||
undo/
|
|
||||||
lsp-bridge/
|
|
||||||
projects
|
|
||||||
amx-items
|
|
||||||
config.el
|
|
||||||
tramp
|
|
||||||
|
|
113
config.org
113
config.org
|
@ -4,7 +4,7 @@
|
||||||
#+AUTHOR: Mars (@pupbrained)
|
#+AUTHOR: Mars (@pupbrained)
|
||||||
#+EMAIL: mars@pupbrained.xyz
|
#+EMAIL: mars@pupbrained.xyz
|
||||||
|
|
||||||
* Basic Setup
|
* Helpers
|
||||||
|
|
||||||
** Server
|
** Server
|
||||||
|
|
||||||
|
@ -70,12 +70,6 @@
|
||||||
dired-omit-files (rx (or (seq bol (? ".") "#")
|
dired-omit-files (rx (or (seq bol (? ".") "#")
|
||||||
(seq bol "." eol)
|
(seq bol "." eol)
|
||||||
(seq bol ".git" eol)))
|
(seq bol ".git" eol)))
|
||||||
dirvish-emerge-groups '(("Recent files" (predicate . recent-files-2h))
|
|
||||||
("Documents" (extensions "pdf" "tex" "bib" "epub"))
|
|
||||||
("Video" (extensions "mp4" "mkv" "webm"))
|
|
||||||
("Pictures" (extensions "jpg" "png" "svg" "gif"))
|
|
||||||
("Audio" (extensions "mp3" "flac" "wav" "ape" "aac"))
|
|
||||||
("Archives" (extensions "gz" "rar" "zip")))
|
|
||||||
dirvish-attributes '(vc-state subtree-state nerd-icons collapse git-msg file-time file-size)
|
dirvish-attributes '(vc-state subtree-state nerd-icons collapse git-msg file-time file-size)
|
||||||
dirvish-mode-line-format '(:left (sort symlink) :right (omit yank index))
|
dirvish-mode-line-format '(:left (sort symlink) :right (omit yank index))
|
||||||
dirvish-mode-line-height 25
|
dirvish-mode-line-height 25
|
||||||
|
@ -142,51 +136,44 @@
|
||||||
** Evil Mode
|
** Evil Mode
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(setq-default evil-auto-indent t
|
|
||||||
indent-line-function 'evil-indent-line
|
|
||||||
indent-tabs-mode nil
|
|
||||||
tab-width 2
|
|
||||||
org-src-tab-acts-natively t
|
|
||||||
org-indent-indentation-per-level 2
|
|
||||||
org-indent-mode-turns-on-hiding-stars nil)
|
|
||||||
|
|
||||||
(defun indent-tabs-hook ()
|
(defun indent-tabs-hook ()
|
||||||
(setq tab-width 2
|
(setq tab-width 2
|
||||||
indent-tabs-mode t
|
indent-tabs-mode nil
|
||||||
evil-auto-indent t
|
evil-auto-indent t))
|
||||||
c-basic-offset 2))
|
|
||||||
|
|
||||||
(dolist (hook '(c++-mode-hook c-mode-hook c++-ts-mode-hook c-ts-mode-hook)) (add-hook hook 'indent-tabs-hook))
|
(dolist (hook '(c++-mode-hook c-mode-hook c++-ts-mode-hook c-ts-mode-hook)) (add-hook hook 'indent-tabs-hook))
|
||||||
|
|
||||||
(use-package evil
|
(use-package evil
|
||||||
:ensure t
|
:ensure t
|
||||||
:init
|
:init
|
||||||
(setq evil-split-window-below t
|
(setq indent-line-function 'evil-indent-line
|
||||||
evil-undo-system 'undo-tree
|
evil-shift-width 2
|
||||||
evil-vsplit-window-right t
|
evil-split-window-below t
|
||||||
evil-want-C-i-jump nil
|
evil-undo-system 'undo-tree
|
||||||
evil-want-C-u-scroll t
|
evil-vsplit-window-right t
|
||||||
evil-want-integration t
|
evil-want-C-i-jump nil
|
||||||
evil-want-integration t
|
evil-want-C-u-scroll t
|
||||||
evil-want-keybinding nil)
|
evil-want-integration t
|
||||||
|
evil-want-keybinding nil)
|
||||||
|
|
||||||
:config
|
:config
|
||||||
(evil-mode 1)
|
(evil-mode 1)
|
||||||
(setq-default evil-shift-width 2)
|
(evil-define-key 'insert prog-mode-map (kbd "TAB") 'tab-to-tab-stop)
|
||||||
(evil-define-key 'insert 'global (kbd "TAB") 'tab-to-tab-stop)
|
(evil-define-key 'insert 'global
|
||||||
(evil-define-key 'insert 'global (kbd "C-c") 'cua-copy-region)
|
(kbd "C-c") 'cua-copy-region
|
||||||
(evil-define-key 'insert 'global (kbd "C-v") 'cua-paste)
|
(kbd "C-v") 'cua-paste
|
||||||
(evil-define-key 'insert 'global (kbd "C-x") 'cua-cut-region)
|
(kbd "C-x") 'cua-cut-region)
|
||||||
(evil-define-key 'normal 'global (kbd "gm") 'magit-status)
|
(evil-define-key 'normal 'global
|
||||||
(evil-define-key 'normal 'global (kbd "gp") 'diff-hl-show-hunk)
|
(kbd "gm") 'magit-status
|
||||||
(evil-define-key 'normal 'global (kbd "gr") 'diff-hl-revert-hunk)
|
(kbd "gp") 'diff-hl-show-hunk
|
||||||
(evil-define-key 'normal 'global (kbd "gs") 'diff-hl-stage-current-hunk))
|
(kbd "gr") 'diff-hl-revert-hunk
|
||||||
|
(kbd "gs") 'diff-hl-stage-current-hunk))
|
||||||
|
|
||||||
(use-package evil-surround
|
(use-package evil-surround
|
||||||
:ensure t
|
:ensure t
|
||||||
:config
|
:config
|
||||||
(global-evil-surround-mode 1))
|
(global-evil-surround-mode 1))
|
||||||
|
|
||||||
;; Set whitespace actions.
|
|
||||||
(setq-default whitespace-action
|
(setq-default whitespace-action
|
||||||
'(cleanup auto-cleanup))
|
'(cleanup auto-cleanup))
|
||||||
|
|
||||||
|
@ -231,7 +218,6 @@
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package catppuccin-theme
|
(use-package catppuccin-theme
|
||||||
:ensure t
|
:ensure t
|
||||||
:demand t
|
|
||||||
:config
|
:config
|
||||||
(load-theme 'catppuccin t))
|
(load-theme 'catppuccin t))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
@ -297,9 +283,10 @@
|
||||||
(when (not (derived-mode-p 'python-ts-mode))
|
(when (not (derived-mode-p 'python-ts-mode))
|
||||||
(add-hook 'before-save-hook #'eglot-format-buffer -10 t)))
|
(add-hook 'before-save-hook #'eglot-format-buffer -10 t)))
|
||||||
(add-hook 'eglot-managed-mode-hook #'eglot-format-buffer-on-save)
|
(add-hook 'eglot-managed-mode-hook #'eglot-format-buffer-on-save)
|
||||||
(add-to-list 'eglot-server-programs
|
(setq eglot-server-programs
|
||||||
'(nix-mode . ("nixd"))
|
`(,@eglot-server-programs
|
||||||
`(c++-mode . ("clangd" "--clang-tidy" "--completion-style=detailed" "--header-insertion=never")))
|
'(nix-mode . ("nixd"))
|
||||||
|
'(c++-mode . ("clangd" "--clang-tidy" "--completion-style=detailed" "--header-insertion=never"))))
|
||||||
:hook
|
:hook
|
||||||
(rust-mode . eglot-ensure)
|
(rust-mode . eglot-ensure)
|
||||||
(rust-ts-mode . eglot-ensure)
|
(rust-ts-mode . eglot-ensure)
|
||||||
|
@ -345,7 +332,7 @@
|
||||||
:custom
|
:custom
|
||||||
(eldoc-box-max-pixel-width 1024)
|
(eldoc-box-max-pixel-width 1024)
|
||||||
:custom-face
|
:custom-face
|
||||||
(eldoc-box-body ((t (:family "Iosevka Comfy Motion" :background "#181825" :foreground "#cdd6f4"))))
|
(eldoc-box-body ((t (:family "Iosevka Comfy Motion" :height 140 :background "#181825" :foreground "#cdd6f4"))))
|
||||||
:config
|
:config
|
||||||
(setq eldoc-message-function #'ignore
|
(setq eldoc-message-function #'ignore
|
||||||
eldoc-idle-delay 0))
|
eldoc-idle-delay 0))
|
||||||
|
@ -357,14 +344,10 @@
|
||||||
(use-package apheleia
|
(use-package apheleia
|
||||||
:ensure t
|
:ensure t
|
||||||
:config
|
:config
|
||||||
(add-to-list 'apheleia-formatters
|
(setq apheleia-formatters
|
||||||
'(alejandra "alejandra" "--quiet" "-")
|
`(,@apheleia-formatters '(alejandra "alejandra" "--quiet" "-") '(clang-format "clang-format")))
|
||||||
'(clang-format "clang-format"))
|
(setq apheleia-mode-alist
|
||||||
(add-to-list 'apheleia-mode-alist
|
`(,@apheleia-mode-alist '(nix-mode . alejandra) '(c-mode . clang-format) '(c++-mode . clang-format)))
|
||||||
'(nix-mode . alejandra)
|
|
||||||
'(c-mode . clang-format))
|
|
||||||
(add-to-list 'apheleia-mode-alist
|
|
||||||
'(c++-mode . clang-format))
|
|
||||||
(apheleia-global-mode +1))
|
(apheleia-global-mode +1))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
@ -405,10 +388,10 @@
|
||||||
(use-package corfu
|
(use-package corfu
|
||||||
:ensure t
|
:ensure t
|
||||||
:custom
|
:custom
|
||||||
(corfu-cycle t) ;;cycle through all things
|
(corfu-cycle t)
|
||||||
(corfu-auto t) ;;autocomplete
|
(corfu-auto t)
|
||||||
(corfu-auto-prefix 1) ;; 2 letters to start autocomplete
|
(corfu-auto-prefix 1)
|
||||||
(corfu-auto-delay 0.0) ;; idk 0s to start?
|
(corfu-auto-delay 0.0)
|
||||||
:bind (:map corfu-map ("<escape>" . corfu-quit))
|
:bind (:map corfu-map ("<escape>" . corfu-quit))
|
||||||
:init (global-corfu-mode))
|
:init (global-corfu-mode))
|
||||||
|
|
||||||
|
@ -478,11 +461,11 @@
|
||||||
(with-selected-frame frame
|
(with-selected-frame frame
|
||||||
(cond
|
(cond
|
||||||
((eq system-type 'darwin)
|
((eq system-type 'darwin)
|
||||||
(set-face-attribute 'default frame :font "Iosevka Comfy Motion-14")
|
(set-face-attribute 'default frame :font "Iosevka Comfy Motion-16")
|
||||||
(set-face-attribute 'fixed-pitch frame :font "Iosevka Comfy Motion-14")
|
(set-face-attribute 'fixed-pitch frame :font "Iosevka Comfy Motion-16")
|
||||||
(set-face-attribute 'variable-pitch frame :font "Iosevka Comfy Motion Duo-16")
|
(set-face-attribute 'variable-pitch frame :font "Iosevka Comfy Motion Duo-16")
|
||||||
(modify-frame-parameters frame
|
(modify-frame-parameters frame
|
||||||
'((font . "Iosevka Comfy Motion-14")
|
'((font . "Iosevka Comfy Motion-16")
|
||||||
(vertical-scroll-bars . nil))))
|
(vertical-scroll-bars . nil))))
|
||||||
((eq system-type 'gnu/linux)
|
((eq system-type 'gnu/linux)
|
||||||
(set-face-attribute 'default frame :font "Iosevka Comfy Motion Medium-12")
|
(set-face-attribute 'default frame :font "Iosevka Comfy Motion Medium-12")
|
||||||
|
@ -510,7 +493,6 @@
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package undo-tree
|
(use-package undo-tree
|
||||||
:ensure t
|
:ensure t
|
||||||
:demand t
|
|
||||||
:config
|
:config
|
||||||
(global-undo-tree-mode)
|
(global-undo-tree-mode)
|
||||||
(setq undo-tree-history-directory-alist '(("." . "~/.emacs.d/undo"))))
|
(setq undo-tree-history-directory-alist '(("." . "~/.emacs.d/undo"))))
|
||||||
|
@ -537,7 +519,10 @@
|
||||||
|
|
||||||
(use-package magit
|
(use-package magit
|
||||||
:ensure t
|
:ensure t
|
||||||
:commands magit-status magit-blame magit-version
|
:commands
|
||||||
|
magit-status
|
||||||
|
magit-blame
|
||||||
|
magit-version
|
||||||
:init
|
:init
|
||||||
(defadvice magit-status (around magit-fullscreen activate)
|
(defadvice magit-status (around magit-fullscreen activate)
|
||||||
(window-configuration-to-register :magit-fullscreen) ad-do-it
|
(window-configuration-to-register :magit-fullscreen) ad-do-it
|
||||||
|
@ -596,8 +581,15 @@
|
||||||
** Org Mode Improvements
|
** Org Mode Improvements
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
(setq-default org-src-tab-acts-natively t
|
||||||
|
org-indent-indentation-per-level 2
|
||||||
|
org-indent-mode-turns-on-hiding-stars nil)
|
||||||
|
|
||||||
(add-hook 'org-mode-hook 'visual-line-mode)
|
(add-hook 'org-mode-hook 'visual-line-mode)
|
||||||
|
|
||||||
|
(require 'org-tempo)
|
||||||
|
(add-to-list 'org-modules 'org-tempo t)
|
||||||
|
|
||||||
(use-package mixed-pitch
|
(use-package mixed-pitch
|
||||||
:hook
|
:hook
|
||||||
(org-mode . mixed-pitch-mode))
|
(org-mode . mixed-pitch-mode))
|
||||||
|
@ -609,11 +601,6 @@
|
||||||
(setq org-ellipsis "…")
|
(setq org-ellipsis "…")
|
||||||
(setq org-modern-star 'replace))
|
(setq org-modern-star 'replace))
|
||||||
|
|
||||||
(use-package org-modern-indent
|
|
||||||
:ensure (org-modern-indent :type git :host github :repo "jdtsmith/org-modern-indent")
|
|
||||||
:config
|
|
||||||
(add-hook 'org-mode-hook #'org-modern-indent-mode 90))
|
|
||||||
|
|
||||||
;; Inhibits autopairs from running for <> in org mode
|
;; Inhibits autopairs from running for <> in org mode
|
||||||
(add-hook 'org-mode-hook
|
(add-hook 'org-mode-hook
|
||||||
(lambda ()
|
(lambda ()
|
||||||
|
|
Loading…
Reference in a new issue