You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the readme I understand that in order to do so I should create a new extension and to import dance api.
However, I couldn't include const { api } = await vscode.extensions.getExtension("gregoire.dance").activate(); on top my extension.ts ( from the "hello world" extension example from https://code.visualstudio.com/api/get-started/your-first-extension ). I got the following error:
Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.
And:
Object is possibly 'undefined'
Also, I was wondering if creating a new extension was the only option.
Is there a simpler way where I can just map a key to a simple javascript function that leverage Dance api ?
The text was updated successfully, but these errors were encountered:
Oh, that's a good idea! Making an extension is possible, but indeed since you have few commands to make you can just add a keybinding. See the run documentation for more information.
As for the error you had, it's unrelated to Dance. You probably configured TypeScript to emit code targeting a particular version of JavaScript, and that version doesn't support using await at the top level of your file, so TypeScript is complaining. Similarly, getExtension(...) may return undefined (if the extension isn't installed), in which case you can't directly call activate(), and therefore TypeScript is complaining.
In keybindings.json, the standard VS Code file for configuring key bindings. There is a VS Code command that brings it up, but I don't remember exactly what it is (and I don't have my laptop right now so I can't check).
Hi,
I was not able to write a script for dance. My goal is to port https://github.com/occivink/kakoune-vertical-selection to codium.
From the readme I understand that in order to do so I should create a new extension and to import dance api.
However, I couldn't include
const { api } = await vscode.extensions.getExtension("gregoire.dance").activate();
on top myextension.ts
( from the "hello world" extension example from https://code.visualstudio.com/api/get-started/your-first-extension ). I got the following error:And:
Also, I was wondering if creating a new extension was the only option.
Is there a simpler way where I can just map a key to a simple javascript function that leverage Dance api ?
The text was updated successfully, but these errors were encountered: