Home

Awesome

Jsonnet Support for Visual Studio Code

A simple bare-bones extension providing simple syntax highlighting for Jsonnet files (specifically, files with the .jsonnet and .libsonnet suffixes), as well as a Markdown-style preview pane that auto-updates every time you save.

Jsonnet preview

Usage

Syntax highlighting works out of the box. Just open any .jsonnet or .libsonnet file, and it will magically work.

To enable the Jsonnet preview pane, it is necessary to install the Jsonnet command line tool (e.g., through brew install jsonnet). If you don't add the jsonnet executable to the PATH then you will need to customize jsonnet.executablePath in your settings.json, so that the extension knows where to find it.

After this, you can use the keybinding for jsonnet.previewToSide (by default this is shift+ctrl+i, or shift+cmd+i on macOS), and the preview pane will open as in the picture above.

Customization

This extension exposes the following settings, which can be customized in settings.json:

This extension exposes the following commands, which can be bound to keys: