grafana / vscode-jsonnet

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

autocomplete for imports #9

Closed iFrozenPhoenix closed 2 years ago

iFrozenPhoenix commented 2 years ago

Environment

go-jsonnet: 0.18.0 jsonnet-language-server: 0.2.3

Current behaviour

When importing a jsonnet file and trying to use it, no autocompletion is provided for the import.

Expected behaviour

After importing a jsonnet file autocompletion is provided for the import, i.e. when pressing the dot key after "im" ident in the example.

Example

test.jsonnet

{
    name: "test"
}

main.jsonnet

local im = import "./test.jsonnet";

{
    asd: im.name
}

output

{
    "asd": "test"
}
julienduchesne commented 2 years ago

Will be tracked here: https://github.com/grafana/jsonnet-language-server/issues/5. I have added autocomplete support for self and locals so far. Imports will happen in october probably