about summary refs log tree commit diff
path: root/editors/code/src/ctx.ts
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-03-28 07:05:43 +0000
committerbors <bors@rust-lang.org>2023-03-28 07:05:43 +0000
commit5bba438c9cf684812e72e9d90c8fea55bd29909c (patch)
tree4b7988975a168b0cac6cc18fe3e31daa4ed938e2 /editors/code/src/ctx.ts
parentf73510560f93262ad2e375d63b526af37aa3ae48 (diff)
parent3622fb645632fcf81af82919259be4b0012a3939 (diff)
downloadrust-5bba438c9cf684812e72e9d90c8fea55bd29909c.tar.gz
rust-5bba438c9cf684812e72e9d90c8fea55bd29909c.zip
Auto merge of #14366 - Veykril:linked-proj, r=Veykril
feat: Pop a notification prompting the user to add a Cargo.toml of unlinked file to the linkedProjects

cc https://github.com/rust-lang/rust-analyzer/issues/13226 https://github.com/rust-lang/rust-analyzer/issues/9661
Diffstat (limited to 'editors/code/src/ctx.ts')
-rw-r--r--editors/code/src/ctx.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/editors/code/src/ctx.ts b/editors/code/src/ctx.ts
index 89264ebe469..dd74b31cc71 100644
--- a/editors/code/src/ctx.ts
+++ b/editors/code/src/ctx.ts
@@ -82,6 +82,7 @@ export class Ctx {
     private state: PersistentState;
     private commandFactories: Record<string, CommandFactory>;
     private commandDisposables: Disposable[];
+    private unlinkedFiles: vscode.Uri[];
 
     get client() {
         return this._client;
@@ -94,11 +95,11 @@ export class Ctx {
     ) {
         extCtx.subscriptions.push(this);
         this.statusBar = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left);
-        this.statusBar.show();
         this.workspace = workspace;
         this.clientSubscriptions = [];
         this.commandDisposables = [];
         this.commandFactories = commandFactories;
+        this.unlinkedFiles = [];
 
         this.state = new PersistentState(extCtx.globalState);
         this.config = new Config(extCtx);
@@ -218,7 +219,8 @@ export class Ctx {
                 this.outputChannel,
                 initializationOptions,
                 serverOptions,
-                this.config
+                this.config,
+                this.unlinkedFiles
             );
             this.pushClientCleanup(
                 this._client.onNotification(ra.serverStatus, (params) =>
@@ -335,6 +337,7 @@ export class Ctx {
     setServerStatus(status: ServerStatusParams | { health: "stopped" }) {
         let icon = "";
         const statusBar = this.statusBar;
+        statusBar.show();
         statusBar.tooltip = new vscode.MarkdownString("", true);
         statusBar.tooltip.isTrusted = true;
         switch (status.health) {