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/
elpa/
elpaca/
recentf
transient/
undo/
amx-items
config.el
tramp

View file

@ -47,13 +47,37 @@
** Dirvish
#+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
:ensure t
:config
:init
(dirvish-override-dired-mode)
:config
(dirvish-peek-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 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
(use-package diredfl
@ -64,8 +88,10 @@
:config
(set-face-attribute 'diredfl-dir-name nil :bold t))
(use-package all-the-icons
:ensure t)
(use-package nerd-icons
:ensure t
:custom
(nerd-icons-font-family "Maple Mono NF"))
(use-package ns-auto-titlebar
:ensure t
@ -106,6 +132,7 @@
(global-evil-leader-mode)
(setq evil-leader/leader "<SPC>")
(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 "e" #'dirvish-side))
@ -146,11 +173,13 @@
(setq display-line-numbers-type 'relative)
(dolist (mode '(term-mode-hook
vterm-mode-hook
shell-mode-hook
dirvish-setup-hook
eshell-mode-hook))
(dolist (mode
'(term-mode-hook
vterm-mode-hook
shell-mode-hook
org-mode-hook
dirvish-setup-hook
eshell-mode-hook))
(add-hook mode (lambda () (display-line-numbers-mode 0))))
#+end_src
@ -168,7 +197,7 @@
((eq system-type 'darwin)
(setq default-frame-alist '((font . "Iosevka Comfy-14"))))
((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)))))
#+end_src
@ -178,6 +207,12 @@
(setq use-short-answers t)
#+end_src
** Enable ctrl+c/ctrl+v
#+begin_src emacs-lisp
(cua-mode 1)
#+end_src
** Undo Tree
#+begin_src emacs-lisp
@ -200,16 +235,59 @@
(setq dashboard-center-content t)
(setq dashboard-vertically-center-content t)
(setq dashboard-startup-banner 'logo)
(setq initial-buffer-choice (lambda () (get-buffer "*dashboard*")))
(setq recentf-exclude '("~/.emacs.d/.cache/treemacs-persist")))
(setq initial-buffer-choice (lambda () (get-buffer "*dashboard*"))))
#+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
** Ido Mode
#+begin_src emacs-lisp
(setq ido-ignore-buffers
'("\\` " "^\*")) ;; Ignore buffers that start with a space or *
(set-face-attribute 'default nil :font "Iosevka Comfy-12")
(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)
(ido-everywhere 1)
(dolist (face '(default fixed-pitch))
(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

View file

@ -1,3 +1,4 @@
(setq elpaca-core-date '(20240911))
(defvar elpaca-installer-version 0.7)
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
@ -38,7 +39,8 @@
(elpaca `(,@elpaca-order))
(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))