This commit is contained in:
Mars 2024-10-05 16:51:21 -04:00
parent 35a7cab081
commit 26f2a43750
Signed by: pupbrained
GPG key ID: 874E22DF2F9DFCB5

View file

@ -50,6 +50,12 @@
#+begin_src emacs-lisp #+begin_src emacs-lisp
(add-hook 'dired-mode-hook 'dired-omit-mode) (add-hook 'dired-mode-hook 'dired-omit-mode)
(use-package ethan-wspace
:ensure t
:config
(setq mode-require-final-newline nil)
(global-ethan-wspace-mode 1))
(defun my/dirvish-create-file () (defun my/dirvish-create-file ()
"Create a new file in the current directory." "Create a new file in the current directory."
(interactive) (interactive)
@ -140,14 +146,11 @@
** Fix Indents + Enable Autopairs ** Fix Indents + Enable Autopairs
#+begin_src emacs-lisp #+begin_src emacs-lisp
(electric-indent-mode 1) (electric-indent-mode -1)
(electric-pair-mode 1) (electric-pair-mode 1)
(setq c-basic-offset 2)
(setq-default tab-width 2) (setq-default tab-width 2)
(setq-default indent-tabs-mode nil) (setq-default indent-tabs-mode nil)
(setq-default standard-indent 2)
(global-set-key (kbd "TAB") 'indent-for-tab-command)
(use-package evil (use-package evil
:ensure t :ensure t
@ -162,11 +165,35 @@
evil-want-keybinding nil) evil-want-keybinding nil)
:config :config
(evil-mode 1) (evil-mode 1)
(evil-define-key 'normal 'global (kbd "K") #'eldoc-box-help-at-point) (setq-default evil-shift-width 2)
(evil-define-key 'normal 'global (kbd "gg") #'magit-status) (evil-define-key 'insert 'global (kbd "TAB") 'tab-to-tab-stop)
(evil-define-key 'normal 'global (kbd "gp") #'diff-hl-show-hunk) (evil-define-key 'normal 'global (kbd "gm") 'magit-status)
(evil-define-key 'normal 'global (kbd "gr") #'diff-hl-revert-hunk) (evil-define-key 'normal 'global (kbd "gp") 'diff-hl-show-hunk)
(evil-define-key 'normal 'global (kbd "gs") #'diff-hl-stage-current-hunk)) (evil-define-key 'normal 'global (kbd "gr") 'diff-hl-revert-hunk)
(evil-define-key 'normal 'global (kbd "gs") 'diff-hl-stage-current-hunk))
(defun my-set-indent-width ()
(setq-local tab-width 2)
(setq-local evil-shift-width 2)
(setq-local indent-tabs-mode nil))
(add-hook 'prog-mode-hook 'my-set-indent-width)
(add-hook 'org-mode-hook 'my-set-indent-width)
(setq-default whitespace-style '(face spaces empty tabs trailing space-mark tab-mark))
(add-hook 'prog-mode-hook 'whitespace-mode)
;; Set whitespace actions.
(setq-default whitespace-action
'(cleanup auto-cleanup))
(use-package general
:ensure t
:config
(general-define-key
:states '(normal visual emacs)
:keymaps 'override
"K" '(eldoc-box-help-at-point :wk "Hover")))
(use-package evil-collection (use-package evil-collection
:ensure t :ensure t
@ -219,8 +246,11 @@
(add-hook 'before-save-hook #'my/eglot-format-buffer-on-save) (add-hook 'before-save-hook #'my/eglot-format-buffer-on-save)
;; Load posframe for popups (use-package eldoc-box
(use-package eldoc-box :ensure t) :ensure t
:config
(setq eldoc-idle-delay 0
eldoc-message-function #'ignore))
#+end_src #+end_src
*** TreeSitter *** TreeSitter