summaryrefslogtreecommitdiff
path: root/extension
diff options
context:
space:
mode:
Diffstat (limited to 'extension')
-rw-r--r--extension/package.json38
-rw-r--r--extension/src/continueIdeClient.ts9
2 files changed, 46 insertions, 1 deletions
diff --git a/extension/package.json b/extension/package.json
index 94a58ebd..a9b8660b 100644
--- a/extension/package.json
+++ b/extension/package.json
@@ -65,12 +65,48 @@
}
}
},
- "commands": [],
+ "commands": [
+ {
+ "command": "continue.suggestionDown",
+ "category": "Continue",
+ "title": "Suggestion Down"
+ },
+ {
+ "command": "continue.suggestionUp",
+ "category": "Continue",
+ "title": "Suggestion Up"
+ },
+ {
+ "command": "continue.acceptSuggestion",
+ "category": "Continue",
+ "title": "Accept Suggestion"
+ },
+ {
+ "command": "continue.rejectSuggestion",
+ "category": "Continue",
+ "title": "Reject Suggestion"
+ }
+ ],
"keybindings": [
{
"command": "continue.focusContinueInput",
"mac": "cmd+k",
"key": "ctrl+k"
+ },
+ {
+ "command": "continue.suggestionDown",
+ "mac": "shift+ctrl+down",
+ "key": "shift+ctrl+down"
+ },
+ {
+ "command": "continue.suggestionUp",
+ "mac": "shift+ctrl+up",
+ "key": "shift+ctrl+up"
+ },
+ {
+ "command": "continue.acceptSuggestion",
+ "mac": "shift+ctrl+enter",
+ "key": "shift+ctrl+enter"
}
],
"menus": {
diff --git a/extension/src/continueIdeClient.ts b/extension/src/continueIdeClient.ts
index fbd00c6e..b1fcd6fb 100644
--- a/extension/src/continueIdeClient.ts
+++ b/extension/src/continueIdeClient.ts
@@ -163,6 +163,15 @@ class IdeProtocolClient {
isWholeLine: true,
});
editor.setDecorations(decorationType, [range]);
+
+ const cursorDisposable = vscode.window.onDidChangeTextEditorSelection(
+ (event) => {
+ if (event.textEditor.document.uri.fsPath === rangeInFile.filepath) {
+ cursorDisposable.dispose();
+ editor.setDecorations(decorationType, []);
+ }
+ }
+ );
}
}