emacs: Add yaml mode and move eln-cache dir

This commit is contained in:
caem 2025-02-14 14:51:10 +01:00
parent 7bf8d8924c
commit 654fa8ce89
Signed by: caem
GPG key ID: 69A830D03203405F
3 changed files with 10 additions and 3 deletions

View file

@ -5,7 +5,8 @@
(use-package indent-bars
:ensure t
:hook (prog-mode . indent-bars-mode)
:hook ((prog-mode . indent-bars-mode)
(text-mode . indent-bars-mode))
:custom
(indent-bars-display-on-blank-lines t)
(indent-bars-pattern " . . . ")

View file

@ -1,3 +1,5 @@
(setq conf-home (concat (or (getenv "XDG_CONFIG_HOME") "~/.config") "/emacs"))
;; Set up paths so that emacs never touches ~/.config/emacs
(let ((data-home (concat (or (getenv "XDG_DATA_HOME") "~/.local/share") "/emacs")))
(setq user-emacs-directory data-home
@ -11,8 +13,8 @@
abbrev-file-name (expand-file-name "abbrev.el" data-home)
savehist-file (expand-file-name "savehist" data-home)
server-auth-dir (expand-file-name "server" data-home)
package-quickstart-file (expand-file-name "package-quickstart.elc" data-home)))
(setq conf-home (concat (or (getenv "XDG_CONFIG_HOME") "~/.config") "/emacs"))
package-quickstart-file (expand-file-name "package-quickstart.elc" data-home))
(startup-redirect-eln-cache (expand-file-name "eln-cache" data-home)))
(package-initialize)

View file

@ -0,0 +1,4 @@
(use-package yaml-mode
:ensure t
:mode ("\\.yaml\\'" . yaml-mode)
:mode ("\\.yml\\'" . yaml-mode))