3737 " onCommand:blocksort.sortInnerBlocksDesc" ,
3838 " onCommand:blocksort.sortInnerBlocksShuffle" ,
3939 " onCommand:blocksort.expandSelectionLocally" ,
40- " onCommand:blocksort.expandSelectionFull"
40+ " onCommand:blocksort.expandSelectionFull" ,
41+ " onCommand:blocksort.quickSort"
4142 ],
4243 "main" : " ./dist/extension.js" ,
4344 "contributes" : {
140141 "dark" : " resources/icon_expand_dark.svg" ,
141142 "light" : " resources/icon_expand.svg"
142143 }
144+ },
145+ {
146+ "command" : " blocksort.quickSort" ,
147+ "title" : " Quick Sort" ,
148+ "category" : " Sort"
143149 }
144150 ],
145151 "configuration" : [
572578 "foldingComplete" : true ,
573579 "indentationComplete" : true
574580 }
575- }
576- },
577- "blocksort.expandCursor " : {
578- "oneOf" : [
579- {
580- "type" : " boolean "
581- },
582- {
583- "type " : " object " ,
584- "minProperties " : 1 ,
585- "properties " : {
586- "expandLocally " : {
587- "type " : " boolean " ,
588- "description" : " Expand selection locally while in the same blocks (stopping at empty lines) "
589- },
590- "expandOverEmptyLines " : {
591- "type " : " boolean " ,
592- "description" : " Expand selection over empty lines "
593- },
594- "foldingComplete " : {
595- "type " : " boolean " ,
596- "description" : " Expand selection, so that all folding markers are closed "
597- },
598- "indentationComplete " : {
599- "type " : " boolean " ,
600- "description" : " Expand selection, so that all indentation is complete "
581+ },
582+ "blocksort.expandCursor" : {
583+ "oneOf " : [
584+ {
585+ "type" : " boolean "
586+ },
587+ {
588+ "type" : " object " ,
589+ "minProperties " : 1 ,
590+ "properties " : {
591+ "expandLocally " : {
592+ "type " : " boolean " ,
593+ "description " : " Expand selection locally while in the same blocks (stopping at empty lines) "
594+ },
595+ "expandOverEmptyLines" : {
596+ "type " : " boolean " ,
597+ "description " : " Expand selection over empty lines "
598+ },
599+ "foldingComplete" : {
600+ "type " : " boolean " ,
601+ "description " : " Expand selection, so that all folding markers are closed "
602+ },
603+ "indentationComplete" : {
604+ "type " : " boolean " ,
605+ "description " : " Expand selection, so that all indentation is complete "
606+ }
601607 }
602608 }
609+ ],
610+ "description" : " Expand cursor to selection when sorting blocks" ,
611+ "default" : {
612+ "expandLocally" : true ,
613+ "expandOverEmptyLines" : false ,
614+ "foldingComplete" : true ,
615+ "indentationComplete" : true
603616 }
604- ],
605- "description" : " Expand cursor to selection when sorting blocks" ,
606- "default" : {
607- "expandLocally" : true ,
608- "expandOverEmptyLines" : false ,
609- "foldingComplete" : true ,
610- "indentationComplete" : true
617+ },
618+ "blocksort.quickSortCommands" : {
619+ "type" : " object" ,
620+ "default" : [
621+ {
622+ "command" : " blocksort.sortBlocksAsc" ,
623+ "label" : " $(sort-asc) Sort Blocks Ascending" ,
624+ "description" : " Expand Selection and sort blocks in ascending order" ,
625+ "picked" : true
626+ },
627+ {
628+ "command" : " blocksort.sortBlocksDesc" ,
629+ "label" : " $(sort-desc) Sort Blocks Descending" ,
630+ "description" : " Expand Selection and sort blocks in descending order"
631+ },
632+ {
633+ "command" : " blocksort.sortBlocksShuffle" ,
634+ "label" : " $(arrow-switch) Shuffle Blocks" ,
635+ "description" : " Expand Selection and shuffle blocks"
636+ },
637+ {
638+ "command" : " editor.action.sortLinesAscending" ,
639+ "label" : " $(sort-asc) Sort Lines Ascending" ,
640+ "description" : " Sort selected lines in ascending order"
641+ },
642+ {
643+ "command" : " editor.action.sortLinesDescending" ,
644+ "label" : " $(sort-desc) Sort Lines Descending" ,
645+ "description" : " Sort selected lines in descending order"
646+ },
647+ {
648+ "command" : " blocksort.expandSelectionLocally" ,
649+ "label" : " $(unfold) Expand Selection" ,
650+ "description" : " Expand current Selection to surrounding Block"
651+ }
652+ ],
653+ "properties" : {
654+ "command" : {
655+ "type" : " string" ,
656+ "description" : " The command to execute"
657+ },
658+ "args" : {
659+ "type" : " array" ,
660+ "description" : " The arguments to pass to the command"
661+ },
662+ "label" : {
663+ "type" : " string" ,
664+ "description" : " A human-readable string which is rendered prominent"
665+ },
666+ "description" : {
667+ "type" : " string" ,
668+ "description" : " A human-readable string which is rendered less prominent in the same line"
669+ },
670+ "detail" : {
671+ "type" : " string" ,
672+ "description" : " A human-readable string which is rendered less prominent in a separate line"
673+ },
674+ "picked" : {
675+ "type" : " boolean" ,
676+ "description" : " Optional flag indicating if this item is picked initially"
677+ },
678+ "alwaysShow" : {
679+ "type" : " boolean" ,
680+ "description" : " Always show this item"
681+ }
682+ },
683+ "required" : [
684+ " command" ,
685+ " label"
686+ ]
611687 }
612688 }
613689 }
715791 ]
716792 ]
717793 }
718- }
794+ }
0 commit comments