Skip to content

Commit be68981

Browse files
committed
0.3.2
1 parent b9cbfac commit be68981

File tree

4 files changed

+23
-5
lines changed

4 files changed

+23
-5
lines changed

Diff for: README.md

+3
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ Common Lisp Editing Extension for vscode
3535

3636
Users appreciate release notes as you update your extension.
3737

38+
### 0.3.2
39+
- Fix path issue that requires cl-lsp in path, was not fixed properly in 0.3.1
40+
3841
### 0.3.1
3942
- Use absolute path as default cl-lsp path
4043

Diff for: package-lock.json

+6-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "commonlisp-vscode",
33
"displayName": "Common Lisp",
44
"description": "Common Lisp Editing Extension for vscode",
5-
"version": "0.3.1",
5+
"version": "0.3.2",
66
"publisher": "ailisp",
77
"icon": "Lisplogo.png",
88
"repository": {
@@ -122,7 +122,8 @@
122122
"vscode-test": "^1.3.0"
123123
},
124124
"dependencies": {
125+
"expand-home-dir": "0.0.3",
125126
"portfinder": "^1.0.26",
126127
"vscode-languageclient": "^6.1.3"
127128
}
128-
}
129+
}

Diff for: src/extension.ts

+11-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import * as child_process from 'child_process';
33
import * as net from 'net';
44
import * as portfinder from 'portfinder';
55
import * as util from 'util';
6+
67
import {
78
workspace, Disposable, ExtensionContext, languages,
89
window, commands, InputBoxOptions
@@ -12,20 +13,29 @@ import {
1213
TransportKind, TextDocumentIdentifier, TextDocumentPositionParams,
1314
StreamInfo
1415
} from 'vscode-languageclient';
16+
import { homedir } from 'os';
1517

1618
let languageClient: LanguageClient;
1719

1820
let repl: vscode.Terminal | null = null;
1921

2022
let lspPort: number | null = null;
2123

24+
function expandHomeDir(path: string): string {
25+
if (path.startsWith('~/')) {
26+
return homedir()+path.slice(1);
27+
}
28+
return path;
29+
}
30+
2231
async function startLSP() {
2332
lspPort = await portfinder.getPortPromise({
2433
port: 10003
2534
});
35+
let lsppath = expandHomeDir(workspace.getConfiguration().get<string>('commonlisp.lsppath')!);
2636
return vscode.window.createTerminal({
2737
name: "Common Lisp REPL",
28-
shellPath: "cl-lsp",
38+
shellPath: lsppath,
2939
shellArgs: ["tcp", lspPort.toString()],
3040
hideFromUser: true,
3141
});
@@ -122,7 +132,6 @@ function backoff<T>(retries: number, fn: () => Promise<T>, delay = 500): Promise
122132
export async function activate(context: ExtensionContext) {
123133
let serverOptions: ServerOptions;
124134
serverOptions = async () => {
125-
let lsppath = workspace.getConfiguration().get<string>('commonlisp.lsppath')!;
126135
let client = new net.Socket();
127136
repl = await startLSP();
128137
return await backoff(5, () => {

0 commit comments

Comments
 (0)