@@ -15,17 +15,18 @@ export function activate(context: vscode.ExtensionContext) {
15 return [];
15 return [];
18+ const cfg = vscode.workspace.getConfiguration("ormolu");
19− proc.execSync('ormolu --help');
21+ proc.execSync(cfg.executablePath + ' --help');
20 } catch (e) {
22 } catch (e) {
21 return showErrorMessage("Ormolu is not installed", e);
23 return showErrorMessage("Ormolu is not installed", e);
24− const cfg = vscode.workspace.getConfiguration("ormolu");
26− let command = "ormolu";
26+ let command = cfg.executablePath;
28 command += ` --start-line ${range.start.line + 1} --end-line ${range.end.line + (range.end.character == 0 ? 0 : 1)}`
28 command += ` --start-line ${range.start.line + 1} --end-line ${range.end.line + (range.end.character == 0 ? 0 : 1)}`
29+ command += ` --stdin-input-file ${document.fileName}`
30 for (let [key, value] of Object.entries(cfg.extensions)) {
31 for (let [key, value] of Object.entries(cfg.extensions)) {
31 if (value) {
32 if (value) {