diff --git a/src/extension.ts b/src/extension.ts index bd04cd9..8709706 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -12,7 +12,7 @@ function format(document: TextDocument): Promise { return new Promise((resolve, reject) => { // Create mix command const mixFormatArgs: string = workspace.getConfiguration("elixir.formatter").get("mixFormatArgs") || ""; - const cmd = `mix format ${mixFormatArgs} ${document.fileName}`; + const cmd = `mix format ${mixFormatArgs} "${document.fileName}"`; // Figure out the working directory to run mix format in const workspaceRootPath = workspace.rootPath ? workspace.rootPath : ""; @@ -46,4 +46,4 @@ export function activate(context: ExtensionContext) { }); } }); -} \ No newline at end of file +}