Skip to content
This repository has been archived by the owner on May 27, 2020. It is now read-only.

Commit

Permalink
feat: improve status bar. show more information
Browse files Browse the repository at this point in the history
  • Loading branch information
axetroy committed Feb 4, 2020
1 parent 1f1cd14 commit 6fb83c4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
23 changes: 19 additions & 4 deletions client/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ interface TypescriptAPI {

interface DenoInfo {
DENO_DIR: string;
version: string;
version: {
deno: string;
v8: string;
typescript: string;
raw: string;
};
executablePath: string;
dtsFilepath: string;
}
Expand Down Expand Up @@ -105,7 +110,12 @@ class Extension {
// Deno Information from Deno Language Server
private denoInfo: DenoInfo = {
DENO_DIR: "",
version: "",
version: {
deno: "",
v8: "",
typescript: "",
raw: ""
},
executablePath: "",
dtsFilepath: ""
};
Expand Down Expand Up @@ -225,8 +235,6 @@ class Extension {
console.log("Deno Language Server is ready!");
client.onNotification("init", (info: DenoInfo) => {
this.denoInfo = { ...this.denoInfo, ...info };
this.statusBar.text = `Deno ${this.denoInfo.version}`;
this.statusBar.tooltip = this.denoInfo.executablePath;
this.updateStatusBarVisibility(window.activeTextEditor);
});
client.onNotification("error", window.showErrorMessage);
Expand Down Expand Up @@ -283,6 +291,13 @@ class Extension {
return;
}

this.statusBar.text = `Deno ${this.denoInfo.version.deno}`;
this.statusBar.tooltip = `Deno ${this.denoInfo.version.deno}
TypeScript ${this.denoInfo.version.typescript}
V8 ${this.denoInfo.version.v8}
Executable ${this.denoInfo.executablePath}
`;

this.statusBar.show();
}
// enable Deno Extension
Expand Down
2 changes: 1 addition & 1 deletion server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ connection.onInitialized(async () => {
return;
}
connection.sendNotification("init", {
version: deno.version ? deno.version.deno : undefined,
version: deno.version ? deno.version : undefined,
executablePath: deno.executablePath,
DENO_DIR: deno.DENO_DIR,
dtsFilepath: deno.dtsFilepath
Expand Down

0 comments on commit 6fb83c4

Please sign in to comment.