summaryrefslogtreecommitdiff
path: root/extension/src/lang-server
diff options
context:
space:
mode:
authorNate Sesti <33237525+sestinj@users.noreply.github.com>2023-06-27 11:43:24 -0700
committerGitHub <noreply@github.com>2023-06-27 11:43:24 -0700
commita32d1b7766844bccc8b0a8dff4a290654446abe9 (patch)
treec47db0ce7cf8be5524103eb62e8f3843ef5b3d99 /extension/src/lang-server
parent3a39f7029f7faf5c77d4678ce6d796e4c99b558b (diff)
parentbf998a752a547485189f5ac1dc415d7ec475099e (diff)
downloadsncontinue-a32d1b7766844bccc8b0a8dff4a290654446abe9.tar.gz
sncontinue-a32d1b7766844bccc8b0a8dff4a290654446abe9.tar.bz2
sncontinue-a32d1b7766844bccc8b0a8dff4a290654446abe9.zip
Merge pull request #155 from continuedev/newer-simpler-stream-algo
Newer simpler stream algo
Diffstat (limited to 'extension/src/lang-server')
-rw-r--r--extension/src/lang-server/codeLens.ts19
1 files changed, 12 insertions, 7 deletions
diff --git a/extension/src/lang-server/codeLens.ts b/extension/src/lang-server/codeLens.ts
index 26528d96..1f352797 100644
--- a/extension/src/lang-server/codeLens.ts
+++ b/extension/src/lang-server/codeLens.ts
@@ -12,21 +12,25 @@ class SuggestionsCodeLensProvider implements vscode.CodeLensProvider {
}
let codeLenses: vscode.CodeLens[] = [];
- for (let suggestion of suggestions) {
- let range = new vscode.Range(
+ for (const suggestion of suggestions) {
+ const range = new vscode.Range(
suggestion.oldRange.start,
suggestion.newRange.end
);
codeLenses.push(
new vscode.CodeLens(range, {
- title: "Accept",
+ title: "Accept ✅",
command: "continue.acceptSuggestion",
arguments: [suggestion],
}),
new vscode.CodeLens(range, {
- title: "Reject",
+ title: "Reject ❌",
command: "continue.rejectSuggestion",
arguments: [suggestion],
+ }),
+ new vscode.CodeLens(range, {
+ title: "(⌘⇧↩/⌘⇧⌫ to accept/reject all)",
+ command: "",
})
);
}
@@ -53,12 +57,13 @@ class SuggestionsCodeLensProvider implements vscode.CodeLensProvider {
const allCodeLensProviders: { [langauge: string]: vscode.CodeLensProvider[] } =
{
- python: [new SuggestionsCodeLensProvider()],
+ // python: [new SuggestionsCodeLensProvider(), new PytestCodeLensProvider()],
+ "*": [new SuggestionsCodeLensProvider()],
};
export function registerAllCodeLensProviders(context: vscode.ExtensionContext) {
- for (let language in allCodeLensProviders) {
- for (let codeLensProvider of allCodeLensProviders[language]) {
+ for (const language in allCodeLensProviders) {
+ for (const codeLensProvider of allCodeLensProviders[language]) {
context.subscriptions.push(
vscode.languages.registerCodeLensProvider(language, codeLensProvider)
);