Some more emacs config additions from previous repo

This commit is contained in:
Random936
2025-08-02 13:57:50 -07:00
parent 8aff638912
commit 9c09854b02
2 changed files with 38 additions and 22 deletions

22
.emacs
View File

@@ -6,25 +6,3 @@
(org-babel-load-file
(expand-file-name "config.org"
user-emacs-directory))
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(package-selected-packages
'(alert all-the-icons-dired cape ccls company consult-org-roam corfu
dashboard dired-hide-dotfiles direnv doom-modeline
doom-themes engrave-faces erc-hl-nicks erc-image ess
evil-collection evil-numbers evil-org flycheck general
go-mode haskell-mode helpful json-mode ledger-mode
lsp-haskell lsp-ui magit marginalia mu4e multi-vterm
nix-mode orderless org-modern perspective projectile
python-mode rainbow-delimiters rustic typescript-mode
undo-tree vertico web-mode yaml-mode yara-mode)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(whitespace-space ((t (:foreground "#384551"))))
'(whitespace-tab ((t (:foreground "#384551")))))

View File

@@ -28,6 +28,22 @@ Enabling global auto revert in Emacs so that changes across a shared file system
(setq auto-revert-verbose 1)
#+end_src
** Relocate Emacs Files
Change location of custom file. This will stop *custom* from appending to the config file.
#+begin_src elisp
(setq custom-file "~/.emacs.d/custom.el")
(unless (file-exists-p custom-file)
(make-empty-file custom-file))
(load custom-file)
#+end_src
This moves the backup files so that Emacs doesn't clutter up directories with backup files.
#+begin_src elisp
(setq backup-directory-alist '(("." . "~/.emacs.d/backups/")))
#+end_src
** Remap Quit Key
Remap quit command to make it easier to rescue a buffer. With this function, escape will be used instead of ~C-g~.
@@ -310,6 +326,28 @@ Projectile is a package for managing various /projects/ in emacs. It adds functi
("C-x C-g" . magit-status)))
#+end_src
* Other Packages
** Dashboard
The ~dashboard~ package provides a nice dashboard when first starting up emacs.
#+begin_src elisp
(use-package dashboard
:init
(setq initial-buffer-choice (lambda () (get-buffer-create "*dashboard*"))
dashboard-startup-banner 'logo
dashboard-icon-type 'nerd-icons
dashboard-set-file-icons t
dashboard-set-heading-icons t
dashboard-items '((projects . 5)
(recents . 5)
(agenda . 5)))
:config
(set-face-attribute 'dashboard-items-face nil :font "Maple Mono" :height 140)
(dashboard-setup-startup-hook))
#+end_src
* Import Other Files
Function to include other config files.