Skip to content

Suggestion: Auto-generate record fields when creating a record value #3748

@cmeeren

Description

@cmeeren

It would be great if the IDE could generate record field labels when you create a record value.

Given this type:

type MyType =
  {Field1: string
   Field2: int
   Field3: bool}

When I write:

let value = 
  {Field1 =<caret here>

I want to be able to execute a quick action or similar so that I end up with the following:

let value = 
  {Field1 =<caret here>
   Field2 = 
   Field3 = }

I realize of course that this might assume one particular style of writing structs, which complicates this a bit.

On the topmost level, what I want is to not have to remember (or look up the definition) and manually type all field names all the time (nor do I want to type those I remember and wait for the IDE to tell me the rest when static analysis fails).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    In Progress

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions