Skip to content

Commit 4d43130

Browse files
authored
Fix bug with overriding options object (#19)
Recently, with the addition of supporting running LSP as a standalone process, the `connect` function was changed. This changed the promise such that the options object was now the result of the `connection.onInitialized` function rather than the result of the callback from `connection.onInitialize`, which seems like an error in understanding the API of the LSP library This reverts that change, but still returns the value options out of the promise, though it is likely an uneeded change. Automated testing for this would be ideal, but as there doesn't seem to be any infrastructure for that currently, that is out of scope of this commit
1 parent a4ba348 commit 4d43130

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function connect(
2929
});
3030

3131
return new Promise((resolve) => {
32-
const options = connection.onInitialized(() => resolve(options));
32+
connection.onInitialized(() => resolve(options));
3333
connection.listen();
3434
return options
3535
});

0 commit comments

Comments
 (0)