Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completion fails when not in an object/array #114

Closed
Duologic opened this issue Aug 20, 2023 · 0 comments · Fixed by #117
Closed

Completion fails when not in an object/array #114

Duologic opened this issue Aug 20, 2023 · 0 comments · Fixed by #117

Comments

@Duologic
Copy link
Member

Duologic commented Aug 20, 2023

When I try to use completion outside an object/array, then if fails.

Does not work:

local hello = import 'hello.jsonnet';

hello.<tab>

Works:

local hello = import 'hello.jsonnet';
[
  hello.<tab>
]
local hello = import 'hello.jsonnet';
{
  a: hello.<tab>
}

Library:

// hello.jsonnet
local hello = {
  hello: {
    to: {
      the: 'world',
    },
  },
};

hello

Error log:

level=error msg="Completion: error finding ranges: could not find bind for hello"
julienduchesne added a commit that referenced this issue Aug 22, 2023
Closes #114
Closes #115

I still have #113 to fix but I'll do it in another PR
julienduchesne added a commit that referenced this issue Aug 23, 2023
* Completion: Fix two issues with local vars
Closes #114
Closes #115

I still have #113 to fix but I'll do it in another PR

* Fix linting

* Fix linting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant