grafana / vscode-jsonnet

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

Odd auto formatting #20

Closed goodspark closed 1 year ago

goodspark commented 1 year ago

If I create a jsonnet file with:

local asd(
  x=1
) = {
  hello: x,
};
asd(x=4)

It gets auto-formatted to:

local asd(
  x=1
      ) = {
  hello: x,
};
asd(x=4)

Which is really weird.

Version: 0.3.1

julienduchesne commented 1 year ago

This is unfortunately an issue with the native jsonnet formatter:

$ echo "local asd(
  x=1
) = {
  hello: x,
};
asd(x=4)" | jsonnetfmt -

local asd(
  x=1
      ) = {
  hello: x,
};
asd(x=4)

An issue here: https://github.com/google/go-jsonnet would be better targeted

goodspark commented 1 year ago

Ah, OK. Thanks! I'll file an issue there.