From a432c7e06ee5e9134bac04d08ac5a1b1802ce30c Mon Sep 17 00:00:00 2001 From: Margret Riegert Date: Sun, 24 Nov 2024 14:21:54 -0500 Subject: [PATCH] Update src/extension.ts Co-authored-by: Sijawusz Pur Rahnama --- src/extension.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extension.ts b/src/extension.ts index dccee26..bfca9d6 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -82,7 +82,7 @@ export function activate(context: ExtensionContext) { }); workspace.onDidSaveTextDocument(doc => { - if (ameba && doc.languageId === 'crystal' && !doc.isUntitled && doc.uri.scheme === 'file') { + if (ameba && ameba.config.onSave && doc.languageId === 'crystal' && !doc.isUntitled && doc.uri.scheme === 'file') { outputChannel.appendLine(`[Save] Running ameba on ${getRelativePath(doc)}`) ameba.execute(doc); }