some more improvements

This commit is contained in:
Mars 2024-10-04 21:40:04 -04:00
parent 2079304463
commit 01013aa6ce
Signed by: pupbrained
GPG key ID: 0FF5B8826803F895
3 changed files with 101 additions and 18 deletions

5
.gitignore vendored
View file

@ -1,7 +1,10 @@
elpaca/ auto-save-list/
eln-cache/ eln-cache/
elpa/ elpa/
elpaca/
recentf recentf
transient/ transient/
undo/ undo/
amx-items
config.el config.el
tramp

View file

@ -47,13 +47,37 @@
** Dirvish ** Dirvish
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq dired-omit-files
(rx (or (seq bol (? ".") "#")
(seq bol "." eol))))
(add-hook 'dired-mode-hook 'dired-omit-mode)
(defun my/dirvish-create-file ()
"Create a new file in the current directory."
(interactive)
(let ((new-file (read-file-name "New file name: " (dired-current-directory))))
(if (file-exists-p new-file)
(message "File already exists!")
(write-region "" nil new-file)
(revert-buffer) ;; Refresh the directory listing
(message "File created: %s" new-file))))
(use-package dirvish (use-package dirvish
:ensure t :ensure t
:config :init
(dirvish-override-dired-mode) (dirvish-override-dired-mode)
:config
(dirvish-peek-mode)
(dirvish-side-follow-mode) (dirvish-side-follow-mode)
(setq dirvish-mode-line-format
'(:left (sort symlink) :right (omit yank index)))
(setq dired-listing-switches "-al --ignore='^\\.$' --human-readable --group-directories-first")
(setq dired-mouse-drag-files t) (setq dired-mouse-drag-files t)
(setq mouse-drag-and-drop-region-cross-program t)) (setq mouse-drag-and-drop-region-cross-program t)
(setq dirvish-subtree-state-style 'nerd)
(setq dirvish-attributes
'(vc-state subtree-state nerd-icons collapse git-msg file-time file-size)))
;; Addtional syntax highlighting for dired ;; Addtional syntax highlighting for dired
(use-package diredfl (use-package diredfl
@ -64,8 +88,10 @@
:config :config
(set-face-attribute 'diredfl-dir-name nil :bold t)) (set-face-attribute 'diredfl-dir-name nil :bold t))
(use-package all-the-icons (use-package nerd-icons
:ensure t) :ensure t
:custom
(nerd-icons-font-family "Maple Mono NF"))
(use-package ns-auto-titlebar (use-package ns-auto-titlebar
:ensure t :ensure t
@ -106,6 +132,7 @@
(global-evil-leader-mode) (global-evil-leader-mode)
(setq evil-leader/leader "<SPC>") (setq evil-leader/leader "<SPC>")
(evil-leader/set-key "a" #'eglot-code-actions) (evil-leader/set-key "a" #'eglot-code-actions)
(evil-leader/set-key "bb" #'switch-to-buffer)
(evil-leader/set-key "bd" #'kill-this-buffer) (evil-leader/set-key "bd" #'kill-this-buffer)
(evil-leader/set-key "e" #'dirvish-side)) (evil-leader/set-key "e" #'dirvish-side))
@ -146,9 +173,11 @@
(setq display-line-numbers-type 'relative) (setq display-line-numbers-type 'relative)
(dolist (mode '(term-mode-hook (dolist (mode
'(term-mode-hook
vterm-mode-hook vterm-mode-hook
shell-mode-hook shell-mode-hook
org-mode-hook
dirvish-setup-hook dirvish-setup-hook
eshell-mode-hook)) eshell-mode-hook))
(add-hook mode (lambda () (display-line-numbers-mode 0)))) (add-hook mode (lambda () (display-line-numbers-mode 0))))
@ -168,7 +197,7 @@
((eq system-type 'darwin) ((eq system-type 'darwin)
(setq default-frame-alist '((font . "Iosevka Comfy-14")))) (setq default-frame-alist '((font . "Iosevka Comfy-14"))))
((eq system-type 'gnu/linux) ((eq system-type 'gnu/linux)
(setq default-frame-alist '((font . "Maple Mono NF-12") (setq default-frame-alist '((font . "Iosevka Comfy Medium-12")
(undecorated . t))))) (undecorated . t)))))
#+end_src #+end_src
@ -178,6 +207,12 @@
(setq use-short-answers t) (setq use-short-answers t)
#+end_src #+end_src
** Enable ctrl+c/ctrl+v
#+begin_src emacs-lisp
(cua-mode 1)
#+end_src
** Undo Tree ** Undo Tree
#+begin_src emacs-lisp #+begin_src emacs-lisp
@ -200,16 +235,59 @@
(setq dashboard-center-content t) (setq dashboard-center-content t)
(setq dashboard-vertically-center-content t) (setq dashboard-vertically-center-content t)
(setq dashboard-startup-banner 'logo) (setq dashboard-startup-banner 'logo)
(setq initial-buffer-choice (lambda () (get-buffer "*dashboard*"))) (setq initial-buffer-choice (lambda () (get-buffer "*dashboard*"))))
(setq recentf-exclude '("~/.emacs.d/.cache/treemacs-persist"))) #+end_src
** Better M-x
*** Ivy Mode (Completions)
#+begin_src emacs-lisp
(setq ivy-ignore-buffers '("\\` " "\\`\\*"))
(use-package ivy
:ensure t
:config
(ivy-mode)
(setq ivy-use-virtual-buffers t)
(setq enable-recursive-minibuffers t))
#+end_src
*** Amx Mode (Better Interface)
#+begin_src emacs-lisp
(use-package amx
:ensure t
:config
(amx-mode))
#+end_src #+end_src
** Ido Mode ** Ido Mode
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq ido-ignore-buffers (set-face-attribute 'default nil :font "Iosevka Comfy-12")
'("\\` " "^\*")) ;; Ignore buffers that start with a space or * (set-face-attribute 'fixed-pitch nil :font "Iosevka Comfy-12")
(set-face-attribute 'variable-pitch nil :font "Iosevka Comfy Motion Duo-14")
(ido-mode 1) (dolist (face '(default fixed-pitch))
(ido-everywhere 1) (set-face-attribute `,face nil :font "Iosevka Comfy-12"))
(use-package mixed-pitch
:hook
(org-mode . mixed-pitch-mode))
(add-hook 'org-mode-hook 'visual-line-mode)
(setq org-ellipsis "…")
(use-package org-modern
:ensure t
:hook (org-mode . org-modern-mode)
:config
(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))
#+end_src #+end_src

View file

@ -1,3 +1,4 @@
(setq elpaca-core-date '(20240911))
(defvar elpaca-installer-version 0.7) (defvar elpaca-installer-version 0.7)
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory)) (defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory)) (defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
@ -38,7 +39,8 @@
(elpaca `(,@elpaca-order)) (elpaca `(,@elpaca-order))
(elpaca elpaca-use-package (elpaca elpaca-use-package
(elpaca-use-package-mode)) (elpaca-use-package-mode)
(setq elpaca-use-package-by-default t))
(use-package emacs :ensure nil :config (setq ring-bell-function #'ignore)) (use-package emacs :ensure nil :config (setq ring-bell-function #'ignore))