我正试图在 spacemacs 中工作得更漂亮。
我有(prettier-js :location (recipe :url "https://raw.githubusercontent.com/prettier/prettier/master/editors/emacs/prettier-js.el" :fetcher url))
这有点工作,但后来在消息中我看到
Contacting host: raw.githubusercontent.com:443
Wrote /Users/travis/.emacs.d/.cache/quelpa/build/prettier-js/prettier-js.el
File: /Users/travis/.emacs.d/.cache/quelpa/build/prettier-js/prettier-js.stamp
Error getting PACKAGE-DESC: (search-failed ;;; prettier-js.el ends here)
Cannot load prettier-js
我还不知道足够多的 emacs 知道 PACKAGE-DESC 做什么,或者我是否需要它来更漂亮地加载。
我正在尝试在私有层中执行此操作
文档说:
将此添加到您的初始化中
(require 'prettier-js)
(add-hook 'js-mode-hook
(lambda ()
(add-hook 'before-save-hook 'prettier-before-save)))
我想我应该有类似的东西:
(defun myJS/post-init-prettier-js ()
"Initialize prettier-js"
(use-package prettier-js)
:defer t
:init
(progn
(add-hook 'before-save-hook 'prettier-before-save)
)
)
在我的层