mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-14 08:57:34 +00:00
Add a command for updating the Github API token
This commit is contained in:
parent
a0a7cd306e
commit
501b516db4
2 changed files with 13 additions and 0 deletions
|
@ -158,6 +158,11 @@
|
|||
"title": "Restart server",
|
||||
"category": "Rust Analyzer"
|
||||
},
|
||||
{
|
||||
"command": "rust-analyzer.updateGithubToken",
|
||||
"title": "Update Github API token",
|
||||
"category": "Rust Analyzer"
|
||||
},
|
||||
{
|
||||
"command": "rust-analyzer.onEnter",
|
||||
"title": "Enhanced enter key",
|
||||
|
@ -984,6 +989,10 @@
|
|||
"command": "rust-analyzer.reload",
|
||||
"when": "inRustProject"
|
||||
},
|
||||
{
|
||||
"command": "rust-analyzer.updateGithubToken",
|
||||
"when": "inRustProject"
|
||||
},
|
||||
{
|
||||
"command": "rust-analyzer.onEnter",
|
||||
"when": "inRustProject"
|
||||
|
|
|
@ -95,6 +95,10 @@ async function tryActivate(context: vscode.ExtensionContext) {
|
|||
await activate(context).catch(log.error);
|
||||
});
|
||||
|
||||
ctx.registerCommand('updateGithubToken', ctx => async () => {
|
||||
await queryForGithubToken(new PersistentState(ctx.globalState));
|
||||
});
|
||||
|
||||
ctx.registerCommand('analyzerStatus', commands.analyzerStatus);
|
||||
ctx.registerCommand('memoryUsage', commands.memoryUsage);
|
||||
ctx.registerCommand('reloadWorkspace', commands.reloadWorkspace);
|
||||
|
|
Loading…
Reference in a new issue