Skip to content

Code Action for pre-filling required fields #801

@radeksimko

Description

@radeksimko

Follow-up to #719


Problem Statement

Users can today introduce a new block into their configuration via completion

2021-08-05 13 02 09

However the block is not considered complete/valid until it has all required attributes and blocks.

This means that users have to either scrolls over a potentially long list of attributes and blocks to add all required ones and/or consult documentation in a separate window.

#719 pre-fills required fields on completion (using the completion LSP method) which mainly solves the problem for new blocks.

Expected User Experience

Block with existing attributes/blocks

A contextual code action would be available to the user to fill any missing required attributes and blocks, similar to gopls:

126799179-dd5a7450-8033-462a-aee3-92b71fa638c9

Proposal

  • provide new quickfix code action associated with the body of a block which has missing required attributes or blocks

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions