diff options
author | Nate Sesti <sestinj@gmail.com> | 2023-06-21 22:20:01 -0700 |
---|---|---|
committer | Nate Sesti <sestinj@gmail.com> | 2023-06-21 22:20:01 -0700 |
commit | 56a5cb49c51bcdf04ccac1f5ffde345b597c8ea4 (patch) | |
tree | 8391d2f0464134cadb04ed152b92f9eb11d147ec /extension | |
parent | 287ec48055b86afad2fdd62fdd3f3987077f448b (diff) | |
download | sncontinue-56a5cb49c51bcdf04ccac1f5ffde345b597c8ea4.tar.gz sncontinue-56a5cb49c51bcdf04ccac1f5ffde345b597c8ea4.tar.bz2 sncontinue-56a5cb49c51bcdf04ccac1f5ffde345b597c8ea4.zip |
suggestions...closer?
Diffstat (limited to 'extension')
-rw-r--r-- | extension/package.json | 38 | ||||
-rw-r--r-- | extension/src/continueIdeClient.ts | 9 |
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, []); + } + } + ); } } |