File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 1414* Add a F# module.
1515* Auto-install ` use-package ` .
1616* Add ` prelude-vertico ` module. Vertico a simpler alternative to ` ivy-mode ` and supersedes Selectrum.
17+ * Make it possible to configure the TypeScript format action using ` prelude-ts-format-action ` .
1718
1819### Changes
1920
Original file line number Diff line number Diff line change 3434
3535(add-to-list 'auto-mode-alist '(" \\ .ts\\ '" . typescript-mode))
3636
37+ (defcustom prelude-ts-format-action #'tide-format-before-save
38+ " The format function to invoke on save.
39+
40+ Triggered only when `prelude-format-on-save' is enabled."
41+ :package-version '(prelude . " 1.2" ))
42+
3743(with-eval-after-load 'typescript-mode
3844 (defun prelude-ts-mode-defaults ()
3945 (interactive )
4652 ; ; formats the buffer before saving
4753 (add-hook 'before-save-hook
4854 (lambda ()
49- (when prelude-format-on-save
50- (tide- format-before-save ))))
55+ (when ( and prelude-format-on-save prelude-ts-format-action)
56+ (funcall prelude-ts- format-action ))))
5157
5258 (setq prelude-ts-mode-hook 'prelude-ts-mode-defaults )
5359
You can’t perform that action at this time.
0 commit comments