jsonnet icon indicating copy to clipboard operation
jsonnet copied to clipboard

Language Server Protocol Support

Open okulam opened this issue 5 years ago • 4 comments

Is there any LSP implementation of Jsonnet? The following projects have a proof-of-concept implementation but they don't seem to be complete:

https://github.com/bryanl/jsonnet-language-server https://github.com/sourcegraph/lsif-jsonnet

okulam avatar Nov 16 '20 21:11 okulam

I'm not aware of any complete implementation. We will support the efforts to create one and ideally we will eventually have an official one.

sbarzowski avatar Nov 16 '20 22:11 sbarzowski

👋 Hello. We (Grafana Labs) have started a language server here: https://github.com/grafana/jsonnet-language-server. As heavy users of jsonnet (see Tanka: https://github.com/grafana/tanka), we are planning on maintaining this pretty actively. The language server currently has good support for:

  • Hover and autocompletion of the stdlib
  • Go-to-definition on most attributes
  • jsonnetlint
  • formatting
  • Error detection
  • jpath detection in Tanka projects

We also have a vscode extension here: https://github.com/grafana/vscode-jsonnet This extension auto-updates the underlying language server

julienduchesne avatar Dec 12 '21 20:12 julienduchesne

@julienduchesne What's the relationship between this repo and https://github.com/jdbaldry/jsonnet-language-server out of curiosity?

Frederick888 avatar Dec 12 '21 22:12 Frederick888

@julienduchesne What's the relationship between this repo and https://github.com/jdbaldry/jsonnet-language-server out of curiosity?

The Grafana repo is actually a fork of Jack's repository that we orphaned. Development will continue on the Grafana repository (Jack is also a Grafana Labs employee)

julienduchesne avatar Dec 12 '21 22:12 julienduchesne