https://github.com/narumincho/vscode
vscode api for deno
https://github.com/narumincho/vscode
Last synced: over 1 year ago
JSON representation
vscode api for deno
- Host: GitHub
- URL: https://github.com/narumincho/vscode
- Owner: narumincho
- License: mit
- Created: 2023-03-05T22:24:14.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-08T07:34:05.000Z (over 1 year ago)
- Last Synced: 2025-03-18T21:52:10.120Z (over 1 year ago)
- Language: TypeScript
- Homepage: https://zenn.dev/narumincho/articles/deno-vscode-extension
- Size: 1.21 MB
- Stars: 10
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vscode
## Visual Studio Code Extension Development for Deno
- https://deno.land/x/vscode
- https://jsr.io/@narumincho/vscode
modified for Deno from
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/vscode/index.d.ts
Must be bundled with
- [esbuild](https://github.com/esbuild/deno-esbuild) with
[esbuild-deno-loader](https://github.com/lucacasonato/esbuild_deno_loader)
- or similar
```ts
import { type ExtensionContext, importVsCodeApi } from "jsr:@narumincho/vscode";
export function activate(context: ExtensionContext) {
const vscode = importVsCodeApi();
if (vscode === undefined) {
throw new Error(
"Could not import vscode api because it was not working within the extension",
);
}
console.log(
'Congratulations, your extension "helloworld-sample" is now active!',
);
const disposable = vscode.commands.registerCommand(
"extension.helloWorld",
() => {
vscode.window.showInformationMessage("Hello World!");
},
);
context.subscriptions.push(disposable);
}
```
All examples can be found
[here](https://github.com/narumincho/vscode/tree/main/example)