mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
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.
30 lines
589 B
EmacsLisp
30 lines
589 B
EmacsLisp
;;; siren-forge.el --- jimeh's Emacs Siren: forge configuration
|
|
|
|
;;; Commentary:
|
|
|
|
;; Basic configuration for forge.
|
|
|
|
;;; Code:
|
|
|
|
(require 'siren-magit)
|
|
|
|
(use-package forge
|
|
: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
|