Skip to content

Commit 5b5270c

Browse files
committed
Require pony-lsp 0.61.0+
Remove ponyStdLibPath setting, as this is no longer needed
1 parent 04e8f62 commit 5b5270c

File tree

4 files changed

+13
-27
lines changed

4 files changed

+13
-27
lines changed

.release-notes/15.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## Require pony-lsp 0.61.0+
2+
3+
`pony-lsp` 0.61.0 or above is now required. This version automatically locates the Pony standard library, so the `pony.ponyStdLibPath` setting has been removed. If you have this set in your `settings.json`, you can safely remove it.

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,20 @@ Install `pony-lsp` and [`ponyc`](https://github.com/ponylang/ponyc) and ensure t
2929
brew install ponyc
3030
```
3131

32+
> [!IMPORTANT]
33+
> `pony-lsp` 0.61.0 or above is required, to ensure it correctly locates the Pony standard library and accepts the needed configuration options.
34+
3235
The extension will show an error if `pony-lsp` is not found.
3336

3437
### Configuration
3538

36-
**`pony.ponyStdLibPath`**: The file path to the Pony standard library. If set, prepended to `PONYPATH`.
39+
**`pony.lsp.executable`**: The file path to the `pony-lsp` executable. If not set, the extension will search for `pony-lsp` on your `PATH`.
40+
41+
**`pony.trace.server`**: Traces the communication between VS Code and the Pony language server. Accepted values are `"off"` (default), `"messages"`, and `"verbose"`.
3742

3843
```json
3944
{
40-
"pony.ponyStdLibPath": "/usr/local/lib/ponyc/0.60.5/packages"
45+
"pony.lsp.executable": "/usr/local/bin/pony-lsp",
46+
"pony.trace.server": "off"
4147
}
4248
```

package.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"contributes": {
2525
"configuration": {
2626
"type": "object",
27-
"title": "Pony configuration",
27+
"title": "Pony",
2828
"properties": {
2929
"pony.trace.server": {
3030
"scope": "window",
@@ -42,12 +42,6 @@
4242
"type": "string",
4343
"default": "",
4444
"description": "File location of the Pony language server executable. If not set, will search for `pony-lsp` on the PATH."
45-
},
46-
"pony.ponyStdLibPath": {
47-
"scope": "window",
48-
"type": "string",
49-
"default": "",
50-
"description": "Path to the Pony standard library packages directory. If not set, pony-lsp will try to auto-detect it."
5145
}
5246
}
5347
},

src/extension.ts

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -58,30 +58,13 @@ export async function activate(_context: ExtensionContext) {
5858
}
5959
outputChannel.appendLine(`Using ${lspExecutable} from PATH`);
6060
}
61-
// Set or append to PONYPATH environment variable
62-
const ponyStdLibPath = config.get<string>('ponyStdLibPath', '');
63-
const env = { ...process.env };
64-
if (ponyStdLibPath) {
65-
if (env.PONYPATH) {
66-
const pathSeparator = process.platform === 'win32' ? ';' : ':';
67-
env.PONYPATH = `${ponyStdLibPath}${pathSeparator}${env.PONYPATH}`;
68-
outputChannel.appendLine(`Prepending to PONYPATH: ${ponyStdLibPath}`);
69-
outputChannel.appendLine(`Full PONYPATH: ${env.PONYPATH}`);
70-
} else {
71-
env.PONYPATH = ponyStdLibPath;
72-
outputChannel.appendLine(`Setting PONYPATH: ${ponyStdLibPath}`);
73-
}
74-
} else if (env.PONYPATH) {
75-
outputChannel.appendLine(`Using existing PONYPATH: ${env.PONYPATH}`);
76-
}
77-
7861
// If the extension is launched in debug mode then the debug server options are used
7962
// Otherwise the run options are used
8063
let serverOptions: ServerOptions = {
8164
command: lspExecutable,
8265
args: ["stdio"],
8366
transport: TransportKind.stdio,
84-
options: { env }
67+
options: { env: process.env }
8568
};
8669

8770
// Options to control the language client

0 commit comments

Comments
 (0)