mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
feat(version-control): correctly format forge-post-mode buffers with prettier-js
forge-post-mode uses temporary files for editing, which means that prettier can't determine the formatter to use based on the filename. Hence we need to explicitly pass `--parser markdown` as a CLI arg to prettier.
This commit is contained in:
@@ -12,5 +12,18 @@
|
||||
:defer t
|
||||
:after magit)
|
||||
|
||||
(use-package forge-post
|
||||
:straight forge
|
||||
:defer t
|
||||
|
||||
:hook
|
||||
(forge-post-mode . siren-forge-post-mode-setup)
|
||||
|
||||
:init
|
||||
(defun siren-forge-post-mode-setup ()
|
||||
(setq-local prettier-js-args '("--parser" "markdown"
|
||||
"--print-width" "80"
|
||||
"--prose-wrap" "always"))))
|
||||
|
||||
(provide 'siren-forge)
|
||||
;;; siren-forge.el ends here
|
||||
|
||||
Reference in New Issue
Block a user