From 71839c378c43d428629472dac985b616cf4b86ec Mon Sep 17 00:00:00 2001 From: Mars Date: Mon, 14 Oct 2024 17:28:00 -0400 Subject: [PATCH] updat --- .gitignore | 18 +++------ config.org | 113 ++++++++++++++++++++++++----------------------------- 2 files changed, 55 insertions(+), 76 deletions(-) diff --git a/.gitignore b/.gitignore index e6da290..d5e151b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,5 @@ -.cache/ -auto-save-list/ -eln-cache/ -elpa/ -elpaca/ -recentf -transient/ -undo/ -lsp-bridge/ -projects -amx-items -config.el -tramp +* +!.gitignore +!config.org +!early-init.el +!init.el diff --git a/config.org b/config.org index 7518eee..bc1dd37 100644 --- a/config.org +++ b/config.org @@ -4,7 +4,7 @@ #+AUTHOR: Mars (@pupbrained) #+EMAIL: mars@pupbrained.xyz -* Basic Setup +* Helpers ** Server @@ -70,12 +70,6 @@ dired-omit-files (rx (or (seq bol (? ".") "#") (seq bol "." 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-mode-line-format '(:left (sort symlink) :right (omit yank index)) dirvish-mode-line-height 25 @@ -142,51 +136,44 @@ ** Evil Mode #+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 () (setq tab-width 2 - indent-tabs-mode t - evil-auto-indent t - c-basic-offset 2)) + indent-tabs-mode nil + evil-auto-indent t)) (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 :ensure t :init - (setq evil-split-window-below t - evil-undo-system 'undo-tree - evil-vsplit-window-right t - evil-want-C-i-jump nil - evil-want-C-u-scroll t - evil-want-integration t - evil-want-integration t - evil-want-keybinding nil) + (setq indent-line-function 'evil-indent-line + evil-shift-width 2 + evil-split-window-below t + evil-undo-system 'undo-tree + evil-vsplit-window-right t + evil-want-C-i-jump nil + evil-want-C-u-scroll t + evil-want-integration t + evil-want-keybinding nil) + :config (evil-mode 1) - (setq-default evil-shift-width 2) - (evil-define-key 'insert 'global (kbd "TAB") 'tab-to-tab-stop) - (evil-define-key 'insert 'global (kbd "C-c") 'cua-copy-region) - (evil-define-key 'insert 'global (kbd "C-v") 'cua-paste) - (evil-define-key 'insert 'global (kbd "C-x") 'cua-cut-region) - (evil-define-key 'normal 'global (kbd "gm") 'magit-status) - (evil-define-key 'normal 'global (kbd "gp") 'diff-hl-show-hunk) - (evil-define-key 'normal 'global (kbd "gr") 'diff-hl-revert-hunk) - (evil-define-key 'normal 'global (kbd "gs") 'diff-hl-stage-current-hunk)) + (evil-define-key 'insert prog-mode-map (kbd "TAB") 'tab-to-tab-stop) + (evil-define-key 'insert 'global + (kbd "C-c") 'cua-copy-region + (kbd "C-v") 'cua-paste + (kbd "C-x") 'cua-cut-region) + (evil-define-key 'normal 'global + (kbd "gm") 'magit-status + (kbd "gp") 'diff-hl-show-hunk + (kbd "gr") 'diff-hl-revert-hunk + (kbd "gs") 'diff-hl-stage-current-hunk)) (use-package evil-surround :ensure t :config (global-evil-surround-mode 1)) - ;; Set whitespace actions. (setq-default whitespace-action '(cleanup auto-cleanup)) @@ -231,7 +218,6 @@ #+begin_src emacs-lisp (use-package catppuccin-theme :ensure t - :demand t :config (load-theme 'catppuccin t)) #+end_src @@ -297,9 +283,10 @@ (when (not (derived-mode-p 'python-ts-mode)) (add-hook 'before-save-hook #'eglot-format-buffer -10 t))) (add-hook 'eglot-managed-mode-hook #'eglot-format-buffer-on-save) - (add-to-list 'eglot-server-programs - '(nix-mode . ("nixd")) - `(c++-mode . ("clangd" "--clang-tidy" "--completion-style=detailed" "--header-insertion=never"))) + (setq eglot-server-programs + `(,@eglot-server-programs + '(nix-mode . ("nixd")) + '(c++-mode . ("clangd" "--clang-tidy" "--completion-style=detailed" "--header-insertion=never")))) :hook (rust-mode . eglot-ensure) (rust-ts-mode . eglot-ensure) @@ -345,7 +332,7 @@ :custom (eldoc-box-max-pixel-width 1024) :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 (setq eldoc-message-function #'ignore eldoc-idle-delay 0)) @@ -357,14 +344,10 @@ (use-package apheleia :ensure t :config - (add-to-list 'apheleia-formatters - '(alejandra "alejandra" "--quiet" "-") - '(clang-format "clang-format")) - (add-to-list 'apheleia-mode-alist - '(nix-mode . alejandra) - '(c-mode . clang-format)) - (add-to-list 'apheleia-mode-alist - '(c++-mode . clang-format)) + (setq apheleia-formatters + `(,@apheleia-formatters '(alejandra "alejandra" "--quiet" "-") '(clang-format "clang-format"))) + (setq apheleia-mode-alist + `(,@apheleia-mode-alist '(nix-mode . alejandra) '(c-mode . clang-format) '(c++-mode . clang-format))) (apheleia-global-mode +1)) #+end_src @@ -405,10 +388,10 @@ (use-package corfu :ensure t :custom - (corfu-cycle t) ;;cycle through all things - (corfu-auto t) ;;autocomplete - (corfu-auto-prefix 1) ;; 2 letters to start autocomplete - (corfu-auto-delay 0.0) ;; idk 0s to start? + (corfu-cycle t) + (corfu-auto t) + (corfu-auto-prefix 1) + (corfu-auto-delay 0.0) :bind (:map corfu-map ("" . corfu-quit)) :init (global-corfu-mode)) @@ -478,11 +461,11 @@ (with-selected-frame frame (cond ((eq system-type 'darwin) - (set-face-attribute 'default frame :font "Iosevka Comfy Motion-14") - (set-face-attribute 'fixed-pitch 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-16") (set-face-attribute 'variable-pitch frame :font "Iosevka Comfy Motion Duo-16") (modify-frame-parameters frame - '((font . "Iosevka Comfy Motion-14") + '((font . "Iosevka Comfy Motion-16") (vertical-scroll-bars . nil)))) ((eq system-type 'gnu/linux) (set-face-attribute 'default frame :font "Iosevka Comfy Motion Medium-12") @@ -510,7 +493,6 @@ #+begin_src emacs-lisp (use-package undo-tree :ensure t - :demand t :config (global-undo-tree-mode) (setq undo-tree-history-directory-alist '(("." . "~/.emacs.d/undo")))) @@ -537,7 +519,10 @@ (use-package magit :ensure t - :commands magit-status magit-blame magit-version + :commands + magit-status + magit-blame + magit-version :init (defadvice magit-status (around magit-fullscreen activate) (window-configuration-to-register :magit-fullscreen) ad-do-it @@ -596,8 +581,15 @@ ** Org Mode Improvements #+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) + (require 'org-tempo) + (add-to-list 'org-modules 'org-tempo t) + (use-package mixed-pitch :hook (org-mode . mixed-pitch-mode)) @@ -609,11 +601,6 @@ (setq org-ellipsis "…") (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 (add-hook 'org-mode-hook (lambda ()