grafana / vscode-jsonnet

Full code support (formatting, highlighting, navigation, etc) for Jsonnet
Apache License 2.0
70 stars 9 forks source link

Is there a way to provide TLAs when evaluating the file? #26

Open pddg opened 1 year ago

pddg commented 1 year ago

I want to evaluate the jsonnet file that requires some TLAs like this.

function(name)
  {
    value: std.format("Hello %s", name)、
  }

However, there seems to be no way to provide these information when evaluating the file. And the evaluation fails due to RUNTIME ERROR: Missing argument: name Top-level function call.

Currently I need to put a dummy file that calls this function to evaluate this. Also, due to this specification, all jsonnet and libsonnet files containing such function declarations are marked with a warning.

Is there some mechanism to provide the TLAs at the time of evaluation?

guiguan commented 1 year ago

Any update on this? The config jsonnet.languageServer.extCode doesn't seem to work

julienduchesne commented 1 year ago

I just published the extCode support: https://github.com/grafana/vscode-jsonnet/releases/tag/v0.4.1