smartparens
smartparens copied to clipboard
Make splicing "control structures" better
When splicing code like
if (....) {
<code>
}
it should remove the {}
along with the condition. Same goes for for loops, while, do, foreach and similar constructs.
A simple rule would be to kill the line up to the first {
and then raise the interior.
It should also work with []
and ()
.
We should use hybrid sexps for resolution, so that code such as
const rows = addressList.map(function (address) { |
return [
generateRow('A', address.number),
generateRow('B', address.number),
]
}).reduce((acc, item) => acc.concat(item))
wont break (I either need to remove the map along with function
prefix or just rise the body... this might be language specific).