Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Jsonnet LSPNew to Visual Studio Code? Get it now.
Jsonnet LSP

Jsonnet LSP

Carl Verge

|
2,003 installs
| (1) | Free
Jsonnet IDE Support. Autocomplete, lint, format, goto def, signature help.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

jsonnet-lsp

This plugin aims to deliver a feature-rich, high quality, high performance IDE experience for Jsonnet. It is designed to work in large repositories with deeply nested imports.

Features

  • Syntax Highliting and Basic Editing features
  • Snippets
  • Custom linting code that is able to deal with large codebases
    • The analysis code is optimized for real-time linting, and can return in <5ms when the normal linter could take minutes.
  • Formatting
  • Delta text update support for efficient editing
  • Designed to remain performant in large repos with many files open
  • Automatic detection of bazel-bin for generated files
  • Type and Value Deduction
    • Supports imported files
    • Able to follow variables, function return values, and array/object indexing
  • Autocomplete
    • Stdlib support with documentation and typed signatures
    • Scoped variable completion
    • Dotted autocomplete
    • Template object field completion
    • Import path completion for files
  • Go to Definition
    • Can follow definitions in other files, including json files
  • Hover Information
  • Function Signature Help
  • AST Recovery
    • The LSP is able recover common syntax issues while typing (like a missing semicolon) for a smoother experience

Missing Features

These are features I consider pretty important that are still missing:

  • More type deduction logic and analysis
  • More IDE options (options for linting, jpath, etc)
  • First class multi-dimension jsonnet support

Development

  • To develop the LSP, change the jsonnet.lsp.binaryPath setting to the runlsp.sh script in the root. Reloading the LSP in vscode (shift+cmd+p -> jsonnet: reload language server) will rebuild the server.
  • To develop the client, open editor/code in vscode, and hit F5 to open a debug build of the client. Generally developing the LSP does not need a debug version of the client.

Release

  • Github actions are setup to publish to OpenVSX automatically when a release is created
  • The LSP binaries are bundled into the .vsix extension, to help reduce bugs from version skew and simplify installation.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft