Skip to content

Code Action: Attributes Packing - Context Awareness #830

Description

@Malix-Labs

Is your feature request related to a problem? Please describe.

Currently, using the Attributes Packing ("Pack dotted path to nested set") Code Action is not context aware, which provides a suboptimal UX

Example

Using the Attributes Packing ("Pack dotted path to nested set") Code Action on :

{
  a.b.c = true;
}

Will always output :

{
  a = { b.c = true; };
}

No matter where the cursor is

Describe the solution you'd like

Making the Attributes Packing ("Pack dotted path to nested set") Code Action context aware

Example

Using the Attributes Packing ("Pack dotted path to nested set") Code Action on :

{
  a.b.c = true;
}

Should output :

{
  a.b = { c = true; };
}

If the cursor is between b and c included

Describe alternatives you've considered

No response

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions