You can build the VS Code extension yourself to experience the latest features and bugs without sponsoring.

Install Node.js

Node.js is the runtime required for building the language server.

You can download it from the official website: https://nodejs.org/en/download. LTS version should be good enough.

Clone the Repositories

You can clone the repositories if you have Git installed:

git clone https://github.com/SPGoding/datapack-language-server.git
git clone https://github.com/SPGoding/vscode-datapack-helper-plus.git

The datapack-language-server repository stores the code of the language server, while vscode-datapack-helper-plus stores the code of the VS Code extension.

Install Node Modules

  1. Go in both repositories and execute npm i individually, which will install the necessary node modules for the language server and the extension to run.
  2. Go in your local datapack-language-server repository, execute npm run build and npm link.
  3. Switch to your local vscode-datapack-helper-plus repository, execute npm link @spgoding/datapack-language-server.

Test the Extension without Packaging

You can start the extension in VS Code directly while developing.

  1. Go in your local datapack-language-server repository.
  2. Run npm run build. The TypeScript code will be compiled to JavaScript. Alternatively you can run npm run watch which keeps compiling the code as long as you make changes to the TypeScript code.
  3. Switch to your local vscode-datapack-helper-plus repository.
  4. Open VS Code there.
  5. Press F5.

Start the Extension with Packaging

You can also start the extension by packaging it with vsce. You can distribute the packaged extension to others.

Install vsce

vsce, short for “Visual Studio Code Extensions”, is a command-line tool for packaging, publishing and managing VS Code extensions. – VS Code’s documentation

You can install vsce by running:

npm install -g vsce

Packaging

  1. Go in your local datapack-language-server repository.
  2. Run npm run build. The TypeScript code will be compiled to JavaScript. Alternatively you can run npm run watch which keeps compiling the code as long as you make changes to the TypeScript code.
  3. Switch to your local vscode-datapack-helper-plus repository.
  4. Run npm run build.
  5. Run vsce package.

After a few minutes, you will get a packaged extension named datapack-language-server-VERSION.vsix in the root directory. You can now install the vsix file to play with it.