Open zardoy opened 1 year ago
For the sake of simplicity:
jsonc-parser
parse probably to determine wether target line is last nodeThe feature was more complicated than I thought, so the implementation is a bit delayed.
Just made it possible to move whole statements for any language (including JSON), and it seems to be handling commas after moving very well: https://github.com/zardoy/vscode-move-statement, so I'm not priorizing this issue. On the other hand for existing workflows, when user uses existing builtin move lines commands we can also help him to manage commas. So I'm up for implementing this one just to make out-of-the-box experience even better.
This extension (like your solution above) works well on single-level JSON. But when the transition from one level to another appears problems. That's why I have a delay in implementing this feature (I also have a deadline at work now, so I can't devote much time to extensions)
Simple json example:
When you move
"bar": true
above (Move Line Up
command, alt+up) this happens:Ideally: