lsp: code action to transform single field to struct
As requested on slack, you often want to transform:
x: y: 3
into
x: {
y: 3
}
and vice versa. Figure out how to do this in lsp, potentially via a "code action"
please for the love of everything yes. a generic roll and unroll hotkey would be phenomenal. like shift+j on default vim, but cue fmt aware, moves the cursor as needed (back and forth), fills in comma syntax. i imagine just holding the hotkey and it formats from your cursor forward until it hits the parsing error that is causing an issue? i think this would make it very difficult for me to get lost writing code and not running it to see if it's syntactically correct.
if you could just keep rolling and unrolling as you go, checking everything is correct, you'd know the edge of your development progress is legit at all times? i.e. user-aided correctness solves the problem before the lsp needs to even do heavy lifting? still reading through matklad's post. https://github.com/cue-lang/cue/issues/3031
also wondering if just creating those highlight markers is actually the best way to do all these where going back in dependencies generates multiple destinations. just cause a highlight around all the relevant objects as if they'd been searched for.