Plugin that modifies text using shell utilities.
Implemented using napi-rs
- a framework for building compiled Node.js add-ons in Rust via Node-API.
- src/ - contains extension source functions that interact with VSCode API
- custom_command/ - contains Napi project with Rust source files that will be build into native module for Node.js
- Install extension dependencies
npm install
- Build Rust module:
cd custom_command
- install dependencies with
yarn install
- install
napi
cli
npm install -g @napi-rs/cli
- build module
napi build --platform --release
- Open
extension.ts
in VSCode and run with F5. - Select text to modify and open Command Palette.
- Select
Run custom command
and type custom command in window.
- Install Visual Studio Code Extensions command line tool
vsce
:
npm install -g @vscode/vsce
- Build extension package:
vsce package
- Run in VSCode:
- switch to
Extensions
panel - select
Install from VSIX
in menu - select .vsix package created by previous command
Implemented with plain TypeScript.
- src/ - contains extension source functions that interact with VSCode API.
- Install extension dependencies
npm install
- Open
extension.ts
in VSCode and run with F5. - Select text to modify and open Command Palette.
- Select
Run custom command
and type custom command in window.
- Install Visual Studio Code Extensions command line tool
vsce
:
npm install -g @vscode/vsce
- Build extension package:
vsce package
- Run in VSCode:
- switch to
Extensions
panel - select
Install from VSIX
in menu - select .vsix package created by previous command