Skip to content

Commit

Permalink
feat: client commands support
Browse files Browse the repository at this point in the history
FYI #256
  • Loading branch information
fannheyward committed Aug 2, 2021
1 parent 602c4d7 commit 0a895fe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,11 @@
"default": false,
"type": "boolean"
},
"rust-analyzer.lens.forceCustomCommands": {
"markdownDescription": "Internal config: use custom client-side commands even when the\nclient doesn't set the corresponding capability.",
"default": true,
"type": "boolean"
},
"rust-analyzer.linkedProjects": {
"markdownDescription": "Disable project auto-discovery in favor of explicitly specified set\nof projects.\n\nElements must be paths pointing to `Cargo.toml`,\n`rust-project.json`, or JSON objects in `rust-project.json` format.",
"default": [],
Expand Down
8 changes: 8 additions & 0 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ class ExperimentalFeatures implements StaticFeature {
caps.snippetTextEdit = true;
caps.resolveCodeAction = true;
caps.serverStatusNotification = true;
caps.commands = {
commands: [
'rust-analyzer.runSingle',
'rust-analyzer.debugSingle',
'rust-analyzer.showReferences',
'rust-analyzer.gotoLocation',
'editor.action.triggerParameterHints'],
};
capabilities.experimental = caps;
}
initialize(): void {}
Expand Down

0 comments on commit 0a895fe

Please sign in to comment.