Skip to content

Commit ec1e235

Browse files
authored
Show pony status bar success only after LSP client starts (#14)
1 parent 2b5ebe5 commit ec1e235

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.release-notes/14.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## Show pony status bar success only after LSP client starts
2+
3+
Previously, the `Pony LSP ✓` status bar indicator was shown as soon as the
4+
`pony-lsp` executable was found on disk — before the language client had
5+
actually connected. If the server failed to start, the status bar would briefly
6+
flash a false success before switching to ``.
7+
8+
The indicator now only shows `` once `client.start()` has resolved
9+
successfully, giving an accurate reflection of the server's readiness.

src/extension.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ export async function activate(_context: ExtensionContext) {
5858
}
5959
outputChannel.appendLine(`Using ${lspExecutable} from PATH`);
6060
}
61-
showPony(true);
62-
6361
// Set or append to PONYPATH environment variable
6462
const ponyStdLibPath = config.get<string>('ponyStdLibPath', '');
6563
const env = { ...process.env };
@@ -108,6 +106,7 @@ export async function activate(_context: ExtensionContext) {
108106
try {
109107
await client.start();
110108
outputChannel.appendLine("Pony language server client ready");
109+
showPony(true);
111110
} catch (reason) {
112111
window.showWarningMessage(`Pony language server client failed: ${reason}`);
113112
showPony(false);

0 commit comments

Comments
 (0)