feat: add dirsize

This commit is contained in:
2026-05-13 22:44:10 +08:00
parent 68e6780238
commit 27e5c11ea9
5 changed files with 160 additions and 78 deletions
+78 -53
View File
@@ -2,60 +2,60 @@
[
{
"key": "alt+cmd+left",
"command": "workbench.action.navigateBack"
"command": "workbench.action.navigateBack",
},
{
"key": "alt+cmd+right",
"command": "workbench.action.navigateForward"
"command": "workbench.action.navigateForward",
},
{
"key": "alt+cmd+l",
"command": "editor.action.formatSelection",
"when": "editorHasDocumentFormattingProvider && editorHasSelection && editorTextFocus && !editorReadonly"
"when": "editorHasDocumentFormattingProvider && editorHasSelection && editorTextFocus && !editorReadonly",
},
{
"key": "cmd+k m",
"command": "-workbench.action.editor.changeLanguageMode",
"when": "!notebookEditorFocused"
"when": "!notebookEditorFocused",
},
{
"key": "ctrl+j",
"command": "selectNextSuggestion",
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus || suggestWidgetVisible && textInputFocus && !suggestWidgetHasFocusedSuggestion"
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus || suggestWidgetVisible && textInputFocus && !suggestWidgetHasFocusedSuggestion",
},
{
"key": "ctrl+n",
"command": "-selectNextSuggestion",
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus || suggestWidgetVisible && textInputFocus && !suggestWidgetHasFocusedSuggestion"
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus || suggestWidgetVisible && textInputFocus && !suggestWidgetHasFocusedSuggestion",
},
{
"key": "ctrl+k",
"command": "-deleteAllRight",
"when": "textInputFocus && !editorReadonly"
"when": "textInputFocus && !editorReadonly",
},
{
"key": "ctrl+k",
"command": "selectPrevSuggestion",
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus || suggestWidgetVisible && textInputFocus && !suggestWidgetHasFocusedSuggestion"
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus || suggestWidgetVisible && textInputFocus && !suggestWidgetHasFocusedSuggestion",
},
{
"key": "ctrl+p",
"command": "-selectPrevSuggestion",
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus || suggestWidgetVisible && textInputFocus && !suggestWidgetHasFocusedSuggestion"
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus || suggestWidgetVisible && textInputFocus && !suggestWidgetHasFocusedSuggestion",
},
{
"key": "cmd+i",
"command": "composerMode.agent"
"command": "composerMode.agent",
},
{
"key": "space",
"command": "vspacecode.space",
"when": "activeEditorGroupEmpty && focusedView == '' && !whichkeyActive && !inputFocus"
"when": "activeEditorGroupEmpty && focusedView == '' && !whichkeyActive && !inputFocus",
},
{
"key": "space",
"command": "vspacecode.space",
"when": "sideBarFocus && !inputFocus && !whichkeyActive"
"when": "sideBarFocus && !inputFocus && !whichkeyActive",
},
// {
// "key": "tab",
@@ -70,197 +70,222 @@
{
"key": "x",
"command": "magit.discard-at-point",
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/"
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/",
},
{
"key": "k",
"command": "-magit.discard-at-point"
"command": "-magit.discard-at-point",
},
{
"key": "-",
"command": "magit.reverse-at-point",
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/"
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/",
},
{
"key": "v",
"command": "-magit.reverse-at-point"
"command": "-magit.reverse-at-point",
},
{
"key": "shift+-",
"command": "magit.reverting",
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/"
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/",
},
{
"key": "shift+v",
"command": "-magit.reverting"
"command": "-magit.reverting",
},
{
"key": "shift+o",
"command": "magit.resetting",
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/"
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/",
},
{
"key": "shift+x",
"command": "-magit.resetting"
"command": "-magit.resetting",
},
{
"key": "x",
"command": "-magit.reset-mixed"
"command": "-magit.reset-mixed",
},
{
"key": "ctrl+u x",
"command": "-magit.reset-hard"
"command": "-magit.reset-hard",
},
{
"key": "y",
"command": "-magit.show-refs"
"command": "-magit.show-refs",
},
{
"key": "y",
"command": "vspacecode.showMagitRefMenu",
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode == 'Normal'"
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode == 'Normal'",
},
{
"key": "g",
"command": "-magit.refresh",
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/"
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/",
},
{
"key": "g",
"command": "vspacecode.showMagitRefreshMenu",
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/"
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/",
},
{
"key": "ctrl+j",
"command": "workbench.action.quickOpenSelectNext",
"when": "inQuickOpen"
"when": "inQuickOpen",
},
{
"key": "ctrl+k",
"command": "workbench.action.quickOpenSelectPrevious",
"when": "inQuickOpen"
"when": "inQuickOpen",
},
{
"key": "ctrl+j",
"command": "selectNextSuggestion",
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus",
},
{
"key": "ctrl+k",
"command": "selectPrevSuggestion",
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus",
},
{
"key": "ctrl+l",
"command": "acceptSelectedSuggestion",
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus",
},
{
"key": "ctrl+j",
"command": "showNextParameterHint",
"when": "editorFocus && parameterHintsMultipleSignatures && parameterHintsVisible"
"when": "editorFocus && parameterHintsMultipleSignatures && parameterHintsVisible",
},
{
"key": "ctrl+k",
"command": "showPrevParameterHint",
"when": "editorFocus && parameterHintsMultipleSignatures && parameterHintsVisible"
"when": "editorFocus && parameterHintsMultipleSignatures && parameterHintsVisible",
},
{
"key": "ctrl+j",
"command": "selectNextCodeAction",
"when": "codeActionMenuVisible"
"when": "codeActionMenuVisible",
},
{
"key": "ctrl+k",
"command": "selectPrevCodeAction",
"when": "codeActionMenuVisible"
"when": "codeActionMenuVisible",
},
{
"key": "ctrl+l",
"command": "acceptSelectedCodeAction",
"when": "codeActionMenuVisible"
"when": "codeActionMenuVisible",
},
// Quick Navigation for file browser
{
"key": "ctrl+h",
"command": "file-browser.stepOut",
"when": "inFileBrowser"
"when": "inFileBrowser",
},
{
"key": "ctrl+l",
"command": "file-browser.stepIn",
"when": "inFileBrowser"
"when": "inFileBrowser",
},
{
"key": "ctrl+h",
"command": "workbench.action.navigateLeft",
"when": "!inQuickOpen && !suggestWidgetVisible && !parameterHintsVisible && !isInDiffEditor"
"when": "!inQuickOpen && !suggestWidgetVisible && !parameterHintsVisible && !isInDiffEditor",
},
{
"key": "ctrl+j",
"command": "workbench.action.navigateDown",
"when": "!codeActionMenuVisible && !inQuickOpen && !suggestWidgetVisible && !parameterHintsVisible"
"when": "!codeActionMenuVisible && !inQuickOpen && !suggestWidgetVisible && !parameterHintsVisible",
},
{
"key": "ctrl+k",
"command": "workbench.action.navigateUp",
"when": "!codeActionMenuVisible && !inQuickOpen && !suggestWidgetVisible && !parameterHintsVisible"
"when": "!codeActionMenuVisible && !inQuickOpen && !suggestWidgetVisible && !parameterHintsVisible",
},
{
"key": "ctrl+l",
"command": "workbench.action.navigateRight",
"when": "!codeActionMenuVisible && !inQuickOpen && !suggestWidgetVisible && !parameterHintsVisible && !isInDiffEditor"
"when": "!codeActionMenuVisible && !inQuickOpen && !suggestWidgetVisible && !parameterHintsVisible && !isInDiffEditor",
},
// Quick Navigation for diff view
{
"key": "ctrl+h",
"command": "workbench.action.compareEditor.focusSecondarySide",
"when": "isInDiffEditor && !isInDiffLeftEditor"
"when": "isInDiffEditor && !isInDiffLeftEditor",
},
{
"key": "ctrl+h",
"command": "workbench.action.navigateLeft",
"when": "isInDiffEditor && isInDiffLeftEditor"
"when": "isInDiffEditor && isInDiffLeftEditor",
},
{
"key": "ctrl+l",
"command": "workbench.action.compareEditor.focusPrimarySide",
"when": "isInDiffEditor && isInDiffLeftEditor"
"when": "isInDiffEditor && isInDiffLeftEditor",
},
{
"key": "ctrl+l",
"command": "workbench.action.navigateRight",
"when": "isInDiffEditor && !isInDiffLeftEditor"
"when": "isInDiffEditor && !isInDiffLeftEditor",
},
{
"key": "ctrl+l",
"command": "workbench.action.terminal.clear",
"when": "terminalFocus && terminalHasBeenCreated && !accessibilityModeEnabled || terminalFocus && terminalProcessSupported && !accessibilityModeEnabled || accessibilityModeEnabled && accessibleViewIsShown && terminalHasBeenCreated && accessibleViewCurrentProviderId == 'terminal' || accessibilityModeEnabled && accessibleViewIsShown && terminalProcessSupported && accessibleViewCurrentProviderId == 'terminal'"
"when": "terminalFocus && terminalHasBeenCreated && !accessibilityModeEnabled || terminalFocus && terminalProcessSupported && !accessibilityModeEnabled || accessibilityModeEnabled && accessibleViewIsShown && terminalHasBeenCreated && accessibleViewCurrentProviderId == 'terminal' || accessibilityModeEnabled && accessibleViewIsShown && terminalProcessSupported && accessibleViewCurrentProviderId == 'terminal'",
},
{
"key": "cmd+k",
"command": "-workbench.action.terminal.clear",
"when": "terminalFocus && terminalHasBeenCreated && !accessibilityModeEnabled || terminalFocus && terminalProcessSupported && !accessibilityModeEnabled || accessibilityModeEnabled && accessibleViewIsShown && terminalHasBeenCreated && accessibleViewCurrentProviderId == 'terminal' || accessibilityModeEnabled && accessibleViewIsShown && terminalProcessSupported && accessibleViewCurrentProviderId == 'terminal'"
"when": "terminalFocus && terminalHasBeenCreated && !accessibilityModeEnabled || terminalFocus && terminalProcessSupported && !accessibilityModeEnabled || accessibilityModeEnabled && accessibleViewIsShown && terminalHasBeenCreated && accessibleViewCurrentProviderId == 'terminal' || accessibilityModeEnabled && accessibleViewIsShown && terminalProcessSupported && accessibleViewCurrentProviderId == 'terminal'",
},
{
"key": "space",
"command": "vspacecode.space",
"when": "terminalFocus && terminalHasBeenCreated && !accessibilityModeEnabled || terminalFocus && terminalProcessSupported && !accessibilityModeEnabled || accessibilityModeEnabled && accessibleViewIsShown && terminalHasBeenCreated && accessibleViewCurrentProviderId == 'terminal' || accessibilityModeEnabled && accessibleViewIsShown && terminalProcessSupported && accessibleViewCurrentProviderId == 'terminal'"
"when": "terminalFocus && terminalHasBeenCreated && !accessibilityModeEnabled || terminalFocus && terminalProcessSupported && !accessibilityModeEnabled || accessibilityModeEnabled && accessibleViewIsShown && terminalHasBeenCreated && accessibleViewCurrentProviderId == 'terminal' || accessibilityModeEnabled && accessibleViewIsShown && terminalProcessSupported && accessibleViewCurrentProviderId == 'terminal'",
},
{
"key": "ctrl+o",
"command": "workbench.action.navigateBack",
"when": "canNavigateBack"
"when": "canNavigateBack",
},
{
"key": "ctrl+-",
"command": "-workbench.action.navigateBack",
"when": "canNavigateBack"
"when": "canNavigateBack",
},
{
"key": "ctrl+o",
"command": "-lineBreakInsert",
"when": "textInputFocus && !editorReadonly"
}
"when": "textInputFocus && !editorReadonly",
},
{
"key": "ctrl+\\",
"command": "-glass.openActionMenu",
"when": "isGlassAgentWorkspace && glassActiveTabKind == 'diff'",
},
{
"key": "ctrl+\\",
"command": "-glass.openPlanBuildMenu",
"when": "isGlassAgentWorkspace && glassActiveTabKind == 'plan'",
},
{
"key": "ctrl+cmd+i",
"command": "-workbench.panel.chat",
"when": "workbench.panel.chat.view.copilot.active",
},
{
"key": "ctrl+\\",
"command": "workbench.action.toggleAgentsFromKeyboard",
"when": "!isAuxiliaryWindowFocusedContext && !isGlass",
},
{
"key": "alt+cmd+j",
"command": "-workbench.action.toggleAgentsFromKeyboard",
"when": "!isAuxiliaryWindowFocusedContext && !isGlass",
},
]