Skip to content

Commit c3ff848

Browse files
fuxk windoge
1 parent cc51c89 commit c3ff848

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"astGrep.serverPath": {
3535
"scope": "window",
3636
"type": "string",
37+
"default": "sg",
3738
"description": "Specify the language server binary path."
3839
},
3940
"astGrep.configPath": {

src/extension.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,16 @@ const languageClientId = 'ast-grep-client'
1414
const languageClientName = 'ast-grep language client'
1515

1616
function getExecutable(isDebug: boolean): Executable {
17-
const defaultExecutable = 'sg'
18-
const command =
19-
workspace.getConfiguration('astGrep').get<string>('serverPath') ||
20-
defaultExecutable
17+
const command = workspace.getConfiguration('astGrep').get('serverPath', 'sg')
2118
return {
2219
command,
2320
args: ['lsp'],
2421
options: {
2522
env: {
2623
...process.env,
2724
...(isDebug ? { RUST_LOG: 'debug' } : {})
28-
}
25+
},
26+
shell: true
2927
}
3028
}
3129
}

0 commit comments

Comments
 (0)