diff --git a/apps/vscode/CHANGELOG.md b/apps/vscode/CHANGELOG.md index b361dc59..89c6d2ee 100644 --- a/apps/vscode/CHANGELOG.md +++ b/apps/vscode/CHANGELOG.md @@ -4,6 +4,7 @@ - Provide F1 help at cursor in Positron () - Expose new context keys for the main language of a document () +- No longer send all snippet suggestions to the bottom of the completion list (). ## 1.117.0 (Release on 2024-11-07) diff --git a/apps/vscode/package.json b/apps/vscode/package.json index 118b1b7b..43169692 100644 --- a/apps/vscode/package.json +++ b/apps/vscode/package.json @@ -896,7 +896,6 @@ "strings": "on" }, "editor.quickSuggestionsDelay": 250, - "editor.snippetSuggestions": "bottom", "editor.wordBasedSuggestions": "off", "editor.suggestOnTriggerCharacters": true, "editor.unicodeHighlight.ambiguousCharacters": false, diff --git a/apps/vscode/src/host/executors.ts b/apps/vscode/src/host/executors.ts index 0fa1a570..fddfe2b5 100644 --- a/apps/vscode/src/host/executors.ts +++ b/apps/vscode/src/host/executors.ts @@ -126,6 +126,25 @@ const juliaCellExecutor: VSCodeCellExecutor = { }, }; +const csharpCellExecutor: VSCodeCellExecutor = { + language: "csharp", + requiredExtension: ["ms-dotnettools.dotnet-interactive-vscode"], + requiredExtensionName: "Polyglot Notebooks", + requiredVersion: "1.0.55", // Adjust minimum version as needed + execute: async (blocks: string[], editorUri?: Uri) => { + const extension = extensions.getExtension("ms-dotnettools.dotnet-interactive-vscode"); + if (extension) { + if (!extension.isActive) { + await extension.activate(); + } + + await jupyterCellExecutor("csharp").execute(blocks); + } else { + window.showErrorMessage("Unable to execute code - Polyglot Notebooks extension not found"); + } + } +}; + const bashCellExecutor: VSCodeCellExecutor = { language: "bash", execute: async (blocks: string[]) => { @@ -147,6 +166,7 @@ const kCellExecutors = [ bashCellExecutor, shCellExecutor, shellCellExecutor, + csharpCellExecutor ]; function findExecutor( diff --git a/apps/vscode/src/host/hooks.ts b/apps/vscode/src/host/hooks.ts index 9c826762..3b0b6965 100644 --- a/apps/vscode/src/host/hooks.ts +++ b/apps/vscode/src/host/hooks.ts @@ -55,6 +55,7 @@ export function hooksExtensionHost(): ExtensionHost { switch (language) { // use hooks for known runtimes case "python": + case "csharp": case "r": return { execute: async (blocks: string[], _editorUri?: vscode.Uri): Promise => {