Skip to content

Commit 1f867a4

Browse files
committed
feat: add format on save
1 parent 47da477 commit 1f867a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/monaco/Monaco.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ onMounted(() => {
143143
}
144144
145145
editorInstance.addCommand(monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyS, () => {
146-
// ignore save event
146+
editorInstance.getAction('editor.action.formatDocument')?.run()
147147
})
148148
149149
watch(

0 commit comments

Comments
 (0)