This tool simplifies the creation of a new plugin project by providing all the necessary configurations. Although a plugin may consist of just a JavaScript and a JSON file, setting it up requires some initial boilerplate code. This generator streamlines that process.
- Node.js
- npm
-
yo: Yeoman's CLI. You can find it here: Yeoman. If you haven't installed it yet, run
npm install -g yo
. For help with installation issues, refer to this guide.
To get started, ensure that all prerequisites are installed. Then, install the generator by running the following command:
npm install -g generator-lsplugin
To create your plugin, navigate to your desired directory and execute the following command:
- Run
yo lsplugin
. - Follow the on-screen prompts to configure your plugin. It's advisable to stay connected to the internet during this process, as the generator fetches the latest type declaration files for the editor scripting API.
For more information about how to build your plugin, refer to the Building Plugins Guide.