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 14
14
* Add a F# module.
15
15
* Auto-install ` use-package ` .
16
16
* 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 ` .
17
18
18
19
### Changes
19
20
Original file line number Diff line number Diff line change 34
34
35
35
(add-to-list 'auto-mode-alist '(" \\ .ts\\ '" . typescript-mode))
36
36
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
+
37
43
(with-eval-after-load 'typescript-mode
38
44
(defun prelude-ts-mode-defaults ()
39
45
(interactive )
46
52
; ; formats the buffer before saving
47
53
(add-hook 'before-save-hook
48
54
(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 ))))
51
57
52
58
(setq prelude-ts-mode-hook 'prelude-ts-mode-defaults )
53
59
You can’t perform that action at this time.
0 commit comments