💥 Replace config/private w/ first-class support
The config/private module has been removed. ~/.doom.d (or ~/.config/doom; whichever is detected first) is now a first class citizen of Doom and should just work(tm). Your init.el only needs to contain: (require 'core (concat user-emacs-directory "core/core")) And you may place your doom! block in ~/.doom.d/init.el (or ~/.config/doom/init.el).
This commit is contained in:
parent
b701303909
commit
355b4b1364
10 changed files with 31 additions and 79 deletions
|
@ -185,9 +185,8 @@
|
|||
:desc "Recent files" :n "r" #'recentf-open-files
|
||||
:desc "Recent project files" :n "R" #'projectile-recentf
|
||||
:desc "Yank filename" :n "y" #'+default/yank-buffer-filename
|
||||
(:when (featurep! :config private)
|
||||
:desc "Find file in private config" :n "p" #'+private/find-in-config
|
||||
:desc "Browse private config" :n "P" #'+private/browse-config))
|
||||
:desc "Find file in private config" :n "p" #'+default/find-in-config
|
||||
:desc "Browse private config" :n "P" #'+default/browse-config)
|
||||
|
||||
(:desc "git" :prefix "g"
|
||||
:desc "Magit blame" :n "b" #'magit-blame
|
||||
|
|
|
@ -39,6 +39,17 @@
|
|||
(interactive) (doom-project-browse emacs-snippets-dir))
|
||||
;; NOTE No need for a browse-snippets variant, use `yas-visit-snippet-file'
|
||||
|
||||
;;;###autoload
|
||||
(defun +default/find-in-config ()
|
||||
"Open a file somewhere in `doom-private-dir' via a fuzzy filename search."
|
||||
(interactive)
|
||||
(doom-project-find-file doom-private-dir))
|
||||
|
||||
;;;###autoload
|
||||
(defun +default/browse-config ()
|
||||
"Browse the files in `doom-private-dir'."
|
||||
(interactive)
|
||||
(doom-project-browse doom-private-dir))
|
||||
|
||||
;;;###autoload
|
||||
(defun +default/compile (arg)
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
#+TITLE: :config private
|
||||
|
||||
This module enables support for an external private module and nested
|
||||
submodules, either at =~/.doom.d= (or =$XDG_CONFIG_HOME/doom= with the ~+xdg~
|
||||
flag).
|
||||
|
||||
* Table of Contents :TOC:
|
||||
- [[Module Flags][Module Flags]]
|
||||
- [[Features][Features]]
|
||||
- [[Private sub-modules][Private sub-modules]]
|
||||
|
||||
* Module Flags
|
||||
+ ~+xdg~ Tells this module to respect XDG conventions and look for your private
|
||||
config in ~$XDG_CONFIG_HOME/doom~ (falls back to =~/.config/doom=).
|
||||
|
||||
* Features
|
||||
** Private sub-modules
|
||||
Modules placed in the =modules/= subdirectory of your external config are
|
||||
symlinked to =~/.emacs.d/modules/private=, and can be activated from ~doom!~:
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(doom! :private private-module1 private-module2 ...)
|
||||
#+END_SRC
|
|
@ -1,13 +0,0 @@
|
|||
;;; config/private/autoload.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;;###autoload
|
||||
(defun +private/find-in-config ()
|
||||
"Open a file somewhere in `+private-config-path' via a fuzzy filename search."
|
||||
(interactive)
|
||||
(doom-project-find-file +private-config-path))
|
||||
|
||||
;;;###autoload
|
||||
(defun +private/browse-config ()
|
||||
"Browse the files in `+private-config-path'."
|
||||
(interactive)
|
||||
(doom-project-browse +private-config-path))
|
|
@ -1,8 +0,0 @@
|
|||
;;; config/private/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(defun +private|load-config ()
|
||||
"Loads your private config.el in `+private-config-path'."
|
||||
(load (expand-file-name "config.el" +private-config-path)
|
||||
'noerror 'nomessage))
|
||||
|
||||
(add-hook 'after-init-hook #'+private|load-config)
|
|
@ -1,5 +0,0 @@
|
|||
;;; config/private/doctor.el -*- lexical-binding: t; -*-
|
||||
|
||||
(unless (file-directory-p +private-config-path)
|
||||
(warn! "Couldn't find '%s'" (file-relative-name +private-config-path "~")))
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
;;; config/private/init.el -*- lexical-binding: t; -*-
|
||||
|
||||
(defvar +private-config-path
|
||||
(if (featurep! +xdg)
|
||||
(expand-file-name "doom/" (or (getenv "XDG_CONFIG_HOME") "~/.config"))
|
||||
"~/.doom.d")
|
||||
"The directory that serves as the root of your external private config for
|
||||
Doom Emacs.")
|
||||
|
||||
;; Ensure `doom//reload-autoloads', `doom//byte-compile' and
|
||||
;; `doom-initialize-packages' will treat `+private-config-path' as the root of
|
||||
;; this module.
|
||||
(cl-pushnew +private-config-path doom-psuedo-module-dirs)
|
||||
(cl-pushnew (expand-file-name "modules/" +private-config-path)
|
||||
doom-modules-dirs :test #'string=)
|
||||
|
||||
;;
|
||||
(load (expand-file-name "init.el" +private-config-path)
|
||||
'noerror 'nomessage)
|
Loading…
Add table
Add a link
Reference in a new issue