Fix doom//quickstart & improve feedback (make quickstart)
This commit is contained in:
parent
d7d9da2210
commit
73045f9950
3 changed files with 51 additions and 19 deletions
|
@ -1,15 +1,10 @@
|
|||
;;; core/autoload/debug.el -*- lexical-binding: t; -*-
|
||||
|
||||
(defun doom-template-exists-p (template)
|
||||
"TODO"
|
||||
(file-exists-p
|
||||
(expand-file-name (format "templates/%s" template)
|
||||
doom-core-dir)))
|
||||
|
||||
(defun doom-template-insert (template)
|
||||
"TODO"
|
||||
(let ((dir (expand-file-name "templates/" doom-core-dir)))
|
||||
(insert-file-contents (expand-file-name template dir))))
|
||||
(let ((file (expand-file-name (format "templates/%s" template) doom-core-dir)))
|
||||
(when (file-exists-p file)
|
||||
(insert-file-contents file))))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom-info ()
|
||||
|
|
|
@ -122,7 +122,7 @@ with the -p option, e.g.
|
|||
|
||||
This command will refuse to overwrite the private directory if it already
|
||||
exists."
|
||||
(doom//quickstart args))
|
||||
(doom//quickstart))
|
||||
|
||||
(def-dispatcher! (install i)
|
||||
"Installs requested plugins that aren't installed."
|
||||
|
@ -252,27 +252,34 @@ recompile. Run this whenever you:
|
|||
|
||||
This deploys a barebones config to `doom-private-dir', installs all missing
|
||||
packages and regenerates the autoloads file."
|
||||
(declare (interactive-only t))
|
||||
(interactive)
|
||||
(let ((short-private-dir (abbreviate-file-name doom-private-dir)))
|
||||
(unless (file-directory-p doom-private-dir)
|
||||
(if (file-directory-p doom-private-dir)
|
||||
(print! (yellow "%s directory already exists. Skipping." short-private-dir))
|
||||
(print! "Creating %s" short-private-dir)
|
||||
(make-directory doom-private-dir t))
|
||||
(make-directory doom-private-dir t)
|
||||
(print! (green "Done!")))
|
||||
(let ((init-file (expand-file-name "init.el" doom-private-dir)))
|
||||
(if (file-exists-p init-file)
|
||||
(print! "%sinit.el already exists. Skipping." short-private-dir)
|
||||
(print! (yellow "%sinit.el already exists. Skipping." short-private-dir))
|
||||
(print! "Copying init.example.el to %s" short-private-dir)
|
||||
(copy-file (expand-file-name "init.example.el" doom-emacs-dir)
|
||||
init-file)))
|
||||
init-file)
|
||||
(print! (green "Done!"))))
|
||||
(let ((config-file (expand-file-name "config.el" doom-private-dir)))
|
||||
(if (file-exists-p config-file)
|
||||
(print! "%sconfig.el already exists. Skipping." short-private-dir)
|
||||
(with-temp-file config-file (insert "")))))
|
||||
(print! "Installing plugins & generating autoloads file, if necessary")
|
||||
(print! "Deploying empty config.el file in %s" short-private-dir)
|
||||
(with-temp-file config-file (insert ""))
|
||||
(print! (green "Done!")))))
|
||||
(print! "Installing plugins")
|
||||
(doom//packages-install)
|
||||
(doom//reload-autoloads)
|
||||
(print! "\n\nDone! Doom Emacs is ready.\n")
|
||||
(print! "Remember to run M-x all-the-icons-install-fonts after starting Emacs for the first time."))
|
||||
(print! "Regenerating autoloads files")
|
||||
(doom//reload-autoloads nil 'force-p)
|
||||
(print! (bold (green "\nFinished! Doom is ready to go!\n")))
|
||||
(with-temp-buffer
|
||||
(doom-template-insert "QUICKSTART_INTRO")
|
||||
(print! (buffer-string))))
|
||||
|
||||
(provide 'core-dispatcher)
|
||||
;;; core-dispatcher.el ends here
|
||||
|
|
30
core/templates/QUICKSTART_INTRO
Normal file
30
core/templates/QUICKSTART_INTRO
Normal file
|
@ -0,0 +1,30 @@
|
|||
Before you doom yourself, there are a few things you should know:
|
||||
|
||||
1. If you use GUI Emacs, run `M-x all-the-icons-install-fonts` so you don't get
|
||||
weird symbols all over the place.
|
||||
|
||||
2. When you edit ~/.doom.d/init.el or modify modules, run:
|
||||
|
||||
bin/doom refresh
|
||||
|
||||
This will ensure all needed packages are installed, all orphaned packages are
|
||||
removed, and your autoloads files are up to date. This is important! If you
|
||||
forget to do this you will get errors!
|
||||
|
||||
3. If something inexplicably goes wrong, it's a good idea to try:
|
||||
|
||||
bin/doom doctor
|
||||
|
||||
It will diagnose common issues with your environment and setup, and may give
|
||||
you clues about what is wrong.
|
||||
|
||||
4. To update doom, run
|
||||
|
||||
bin/doom upgrade
|
||||
|
||||
Doing it any other way will require you run `bin/doom refresh` otherwise,
|
||||
|
||||
5. Check out `bin/doom help` to see what else it can do (it is also safe to add
|
||||
~/.emacs.d/bin to your PATH).
|
||||
|
||||
Have fun!
|
Loading…
Add table
Add a link
Reference in a new issue