on 4ca3282 help sign in
CHANGELOG.md−7
since splitsnapshots
unifiedsplit
@@ -1,12 +1,5 @@
1# Change Log
1# Change Log
2
2
3−### 0.0.12
4−
5−Fixed a bug where executable paths outside of `$PATH` would fail. (@lzszt)
6−
7−### 0.0.11
8−
9−Added the ability to specify the path to the executable.
10
3
11### 0.0.10
4### 0.0.10
12
5
package.json+2−9
@@ -3,7 +3,7 @@
3 "displayName": "Ormolu",
3 "displayName": "Ormolu",
4 "publisher": "ilyakooo0",
4 "publisher": "ilyakooo0",
5 "description": "Haskell code formatter with ormolu",
5 "description": "Haskell code formatter with ormolu",
6− "version": "0.0.12",
6+ "version": "0.0.10",
7 "repository": {
7 "repository": {
8 "type": "git",
8 "type": "git",
9 "url": "https://github.com/ilyakooo0/vs-code-ormolu"
9 "url": "https://github.com/ilyakooo0/vs-code-ormolu"
@@ -128,13 +128,6 @@
128 ],
128 ],
129 "default": null,
129 "default": null,
130 "description": "Custom arguments to pass to ormolu."
130 "description": "Custom arguments to pass to ormolu."
131− },
132− "ormolu.executablePath": {
133− "type": [
134− "string"
135− ],
136− "default": "ormolu",
137− "description": "The path to the ormolu executable to use."
138 }
131 }
139 }
132 }
140 }
133 }
@@ -160,4 +153,4 @@
160 "tslint": "^5.12.1",
153 "tslint": "^5.12.1",
161 "vscode-test": "^1.2.0"
154 "vscode-test": "^1.2.0"
162 }
155 }
163−}
156+}
src/extension.ts+4−5
@@ -15,18 +15,17 @@ export function activate(context: vscode.ExtensionContext) {
15 return [];
15 return [];
16 };
16 };
17
17
18− const cfg = vscode.workspace.getConfiguration("ormolu");
19−
20 try {
18 try {
21− proc.execSync(cfg.executablePath + ' --help');
19+ proc.execSync('ormolu --help');
22 } catch (e) {
20 } catch (e) {
23 return showErrorMessage("Ormolu is not installed", e);
21 return showErrorMessage("Ormolu is not installed", e);
24 }
22 }
25
23
24+ const cfg = vscode.workspace.getConfiguration("ormolu");
25+
26− let command = cfg.executablePath;
26+ let command = "ormolu";
27
27
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
29
31 for (let [key, value] of Object.entries(cfg.extensions)) {
30 for (let [key, value] of Object.entries(cfg.extensions)) {
32 if (value) {
31 if (value) {