Is your feature request related to a problem? Please describe.
Currently, there is no code action to group similar attributes
Describe the solution you'd like
Featuring a code action to group similar attributes
Example
On this snippet :
{
a.b = true;
a.c = true;
a = { d = true; };
a = {
e.f = true;
e.g = true;
};
}
Upon selecting a, running the "Attributes Grouping" Code Action should output :
{
a = {
b = true;
c = true;
d = true;
e.f = true;
e.g = true;
};
}
Taking in its scope only the selection, or otherwise the current file / module
Also, a Group Recursively variant should execute that code action recursively on nested attributes
So this input :
{
a.b = true;
a.c = true;
a = { d = true; };
a = {
e.f = true;
e.g = true;
};
}
Upon selecting a, running the "Attributes Grouping Recursively" Code Action should output :
{
a = {
b = true;
c = true;
d = true;
e = {
f = true;
g = true;
};
};
}
Describe alternatives you've considered
No response
Additional context
- Linked : Code Action - Attribute Grouping
- Related : Code Action - Attribute Packing
- Implementation
- Testing
- Feature Request
Is your feature request related to a problem? Please describe.
Currently, there is no code action to group similar attributes
Describe the solution you'd like
Featuring a code action to group similar attributes
Example
On this snippet :
Upon selecting
a, running the "Attributes Grouping" Code Action should output :Taking in its scope only the selection, or otherwise the current file / module
Also, a
Group Recursivelyvariant should execute that code action recursively on nested attributesSo this input :
Upon selecting
a, running the "Attributes Grouping Recursively" Code Action should output :Describe alternatives you've considered
No response
Additional context