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 | 8262dd66cefc39f28d75e35e4de389d124aca2c0 (patch) | |
tree | 3e611046fe1abb3983e3286ecb7d11acafd4709c /extension | |
parent | 94341653cae5b9af6e33f480847dfb562aa7578c (diff) | |
download | sncontinue-8262dd66cefc39f28d75e35e4de389d124aca2c0.tar.gz sncontinue-8262dd66cefc39f28d75e35e4de389d124aca2c0.tar.bz2 sncontinue-8262dd66cefc39f28d75e35e4de389d124aca2c0.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, []); + } + } + ); } } |