pulumi/pulumi-lsp

Fails to handle explicit providers

Closed this issue · 1 comments

What happened?

  • Attempts to find the provider for pulumi, erroring when it cannot be found.
  • After pulumi:providers:aws is typed out, correctly recognizes that this is in the aws package but says pulumi:providers:aws does not exist in aws.
  • Autocomplete doesn't work on the type.

Steps to reproduce

Typing this document produces all of the following errors:

name: yaml-name
runtime: yaml
resources:
  provider:
    type: pulumi:providers:aws
    properties:
      region: us-west-2
  bucket:
    type: aws:s3:Bucket

Expected Behavior

Everything should just work:

  1. When entering pu it should autocomplete to pulumi.
  2. pulumi: should autocomplete to pulumi:providers:.
  3. pulumi:providers: should autocomplete to aws (since it is one of the currently loaded modules).
  4. Then the rest of the completion engine should work as normal for provider fields.

Actual Behavior

See "What happened"

Versions used

pulumi-lsp doesn't have versions. See #18.

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

Fixed by #20