Skip to content

Commit 2b4c9c6

Browse files
committed
feat(vscode): add new command Restart Language Server
If the extension hangs, you can try to restart only the language server of robot code instead of restart or reload vscode
1 parent bb92090 commit 2b4c9c6

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,11 @@
593593
"command": "robotcode.debugCurrentFile",
594594
"enablement": "resourceLangId == robotframework && resourceExtname == .robot || explorerResourceIsFolder",
595595
"icon": "$(debug-alt)"
596+
},
597+
{
598+
"title": "Restart Language Servers",
599+
"category": "robotcode",
600+
"command": "robotcode.restartLanguageServers"
596601
}
597602
],
598603
"menus": {

vscode-client/languageclientsmanger.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ export class LanguageClientsManager {
125125
},
126126
},
127127
vscode.workspace.onDidChangeWorkspaceFolders(async (_event) => this.refresh()),
128-
vscode.workspace.onDidOpenTextDocument(async (document) => this.getLanguageClientForDocument(document))
128+
vscode.workspace.onDidOpenTextDocument(async (document) => this.getLanguageClientForDocument(document)),
129+
vscode.commands.registerCommand("robotcode.restartLanguageServers", async () => await this.restart())
129130
);
130131
}
131132

0 commit comments

Comments
 (0)