Browse Source

Rename directories

master
Riyyi 4 years ago
parent
commit
537a4f0387
  1. 48
      .emacs.d/config.org

48
.emacs.d/config.org

@ -83,13 +83,13 @@ M-x =all-the-icons-install-fonts=
Variables for directories and leader keys. Variables for directories and leader keys.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(defvar emacs-d (directory-file-name (file-truename user-emacs-directory)) (defvar dot-emacs-dir (directory-file-name (file-truename user-emacs-directory))
"Directory base.") "Directory base.")
(defvar dot-etc-dir (concat emacs-d "/etc") (defvar dot-etc-dir (concat dot-emacs-dir "/etc")
"Directory for non-volatile storage.") "Directory for non-volatile storage.")
(defvar emacs-cache (concat (getenv "XDG_CACHE_HOME") "/emacs") (defvar dot-cache-dir (concat (getenv "XDG_CACHE_HOME") "/emacs")
"Directory for cache data.") "Directory for cache data.")
(defvar dot/leader-key "SPC" (defvar dot/leader-key "SPC"
@ -140,7 +140,7 @@ https://github.com/rranelli/auto-package-update.el
:custom :custom
(auto-package-update-delete-old-versions t) (auto-package-update-delete-old-versions t)
(auto-package-update-hide-results t) (auto-package-update-hide-results t)
(auto-package-update-last-update-day-path (concat emacs-cache "/last-package-update-day")) (auto-package-update-last-update-day-path (concat dot-cache-dir "/last-package-update-day"))
:config :config
(auto-package-update-maybe)) (auto-package-update-maybe))
#+END_SRC #+END_SRC
@ -191,7 +191,7 @@ Install and configure packages.
:defer t :defer t
:custom :custom
(smex-prompt-string "Command: ") (smex-prompt-string "Command: ")
(smex-save-file (concat emacs-cache "/smex-items")) (smex-save-file (concat dot-cache-dir "/smex-items"))
:config (smex-initialize)) :config (smex-initialize))
(use-package avy (use-package avy
@ -308,10 +308,10 @@ Project manager.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package projectile (use-package projectile
:custom :custom
(projectile-cache-file (concat emacs-cache "/projectile.cache")) (projectile-cache-file (concat dot-cache-dir "/projectile.cache"))
(projectile-enable-caching t) (projectile-enable-caching t)
(projectile-indexing-method 'hybrid) (projectile-indexing-method 'hybrid)
(projectile-known-projects-file (concat emacs-cache "/projectile-bookmarks.eld")) (projectile-known-projects-file (concat dot-cache-dir "/projectile-bookmarks.eld"))
(projectile-project-search-path '("~")) (projectile-project-search-path '("~"))
(projectile-sort-order 'recentf) (projectile-sort-order 'recentf)
:config (projectile-mode)) :config (projectile-mode))
@ -399,10 +399,10 @@ On the fly syntax checking.
(lsp-auto-guess-root t) (lsp-auto-guess-root t)
(lsp-clients-clangd-args '("-compile-commands-dir=build" "-j=2" "-background-index" "-log=error")) (lsp-clients-clangd-args '("-compile-commands-dir=build" "-j=2" "-background-index" "-log=error"))
(lsp-enable-xref t) (lsp-enable-xref t)
(lsp-intelephense-storage-path (concat emacs-cache "/lsp-cache")) (lsp-intelephense-storage-path (concat dot-cache-dir "/lsp-cache"))
(lsp-keep-workspace-alive nil) (lsp-keep-workspace-alive nil)
(lsp-prefer-flymake nil) (lsp-prefer-flymake nil)
(lsp-session-file (concat emacs-cache "/lsp-session-v1")) (lsp-session-file (concat dot-cache-dir "/lsp-session-v1"))
:config :config
;; Enable which-key descriptions ;; Enable which-key descriptions
@ -451,7 +451,7 @@ On the fly syntax checking.
:custom :custom
(yas-prompt-functions '(yas-ido-prompt (yas-prompt-functions '(yas-ido-prompt
yas-completing-prompt)) yas-completing-prompt))
(yas-snippet-dirs (list (concat emacs-d "/snippets"))) (yas-snippet-dirs (list (concat dot-emacs-dir "/snippets")))
:config (yas-reload-all)) :config (yas-reload-all))
(use-package yasnippet-snippets (use-package yasnippet-snippets
@ -470,7 +470,7 @@ Irony requires M-x =irony-install-server=.
c++-mode) c++-mode)
. irony-mode) . irony-mode)
(irony-mode . irony-cdb-autosetup-compile-options) (irony-mode . irony-cdb-autosetup-compile-options)
:init (setq irony-user-dir (concat emacs-cache "/irony/")) :init (setq irony-user-dir (concat dot-cache-dir "/irony/"))
:config (push 'glsl-mode irony-supported-major-modes)) :config (push 'glsl-mode irony-supported-major-modes))
(use-package company-irony (use-package company-irony
@ -551,7 +551,7 @@ https://github.com/laishulu/hl-fill-column
(use-package elfeed (use-package elfeed
:defer t :defer t
:custom :custom
(elfeed-db-directory (concat emacs-cache "/elfeed")) (elfeed-db-directory (concat dot-cache-dir "/elfeed"))
(elfeed-enclosure-default-dir "~/downloads/") (elfeed-enclosure-default-dir "~/downloads/")
(elfeed-search-filter "@6-months-ago +unread") (elfeed-search-filter "@6-months-ago +unread")
(elfeed-search-clipboard-type 'CLIPBOARD) (elfeed-search-clipboard-type 'CLIPBOARD)
@ -655,22 +655,22 @@ Set file paths for built-in features like: auto-saves, backups,
packages and tramp. packages and tramp.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(unless (file-directory-p emacs-cache) (unless (file-directory-p dot-cache-dir)
(make-directory emacs-cache t)) (make-directory dot-cache-dir t))
;; Set Directory locations ;; Set Directory locations
(setq auto-save-list-file-prefix (concat emacs-cache "/auto-save/")) (setq auto-save-list-file-prefix (concat dot-cache-dir "/auto-save/"))
(setq auto-save-file-name-transforms `((".*" ,auto-save-list-file-prefix t))) (setq auto-save-file-name-transforms `((".*" ,auto-save-list-file-prefix t)))
(setq backup-directory-alist `((".*" . ,(concat emacs-cache "/backup/")))) (setq backup-directory-alist `((".*" . ,(concat dot-cache-dir "/backup/"))))
(setq package-user-dir (concat emacs-d "/elpa")) (setq package-user-dir (concat dot-emacs-dir "/elpa"))
(setq tramp-auto-save-directory (concat emacs-cache "/tramp-auto-save/")) (setq tramp-auto-save-directory (concat dot-cache-dir "/tramp-auto-save/"))
(setq tramp-backup-directory-alist backup-directory-alist) (setq tramp-backup-directory-alist backup-directory-alist)
;; Set file locations ;; Set file locations
(setq bookmark-default-file (concat dot-etc-dir "/bookmarks")) (setq bookmark-default-file (concat dot-etc-dir "/bookmarks"))
(setq ido-save-directory-list-file (concat emacs-cache "/ido.last")) (setq ido-save-directory-list-file (concat dot-cache-dir "/ido.last"))
(setq nsm-settings-file (concat emacs-cache "/network-security.data")) (setq nsm-settings-file (concat dot-cache-dir "/network-security.data"))
(setq tramp-persistency-file-name (concat emacs-cache "/tramp")) (setq tramp-persistency-file-name (concat dot-cache-dir "/tramp"))
#+END_SRC #+END_SRC
** File Backups Versioning ** File Backups Versioning
@ -748,7 +748,7 @@ Setup file backups versioning.
(setq recentf-filename-handlers '(abbreviate-file-name)) (setq recentf-filename-handlers '(abbreviate-file-name))
(setq recentf-max-menu-items 0) (setq recentf-max-menu-items 0)
(setq recentf-max-saved-items 200) (setq recentf-max-saved-items 200)
(setq recentf-save-file (concat emacs-cache "/recentf")) (setq recentf-save-file (concat dot-cache-dir "/recentf"))
(recentf-mode) (recentf-mode)
) )
#+END_SRC #+END_SRC
@ -835,12 +835,12 @@ Functions that only use built-in Emacs functionality.
(defun config-visit () (defun config-visit ()
"Config edit." "Config edit."
(interactive) (interactive)
(find-file (concat emacs-d "/config.org"))) (find-file (concat dot-emacs-dir "/config.org")))
(defun config-reload () (defun config-reload ()
"Config reload." "Config reload."
(interactive) (interactive)
(org-babel-load-file (concat emacs-d "/config.org"))) (org-babel-load-file (concat dot-emacs-dir "/config.org")))
(defun display-startup-echo-area-message () (defun display-startup-echo-area-message ()
"Hide default startup message." "Hide default startup message."

Loading…
Cancel
Save