Skip to content

Support autocompletion of vars when including roles that contain meta/argument_specs.yml #1817

Open
@komish

Description

@komish

Problem

I don't see autocompletion provided when writing a playbook that includes a role that provides meta/argument_specs.yaml. The argument_specs.yaml provides validation at runtime, but I'd like to see completion for it as well.

Solution

The playbook that includes the role and has vars defined for it should have autocompletion provided by the language server for the included role's vars, assuming the role has provided the spec. This is similar behavior to what we see for module vars.

Alternatives

No response

Additional context

#606 was opened/closed and appears to have the same ask. That issue specifies that this is already supported, but I think (a) there was a miscommunication in what was desired, or (b) there needs to be better documentation about how to use this feature if it's already implemented.

I will note that including meta/argument_specs.yaml does seem to automatically trigger argument_spec_validation, which is great, but I'd like users who pull in the role to have some autocompletion when they're calling it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type

    Projects

    Status

    Roadmap

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions