diff --git a/generator/config.json b/generator/config.json index b18c0739..6f5ee0dc 100644 --- a/generator/config.json +++ b/generator/config.json @@ -14,22 +14,6 @@ } ], "exclusion": [ - "editor.action.triggerSuggest", - "hideSuggestWidget", - "selectNextSuggestion", - "selectPrevSuggestion", - "selectNextPageSuggestion", - "selectPrevPageSuggestion", - "toggleExplainMode", - "toggleSuggestionDetails", - "toggleSuggestionFocus", - "acceptSelectedSuggestion", - "acceptAlternativeSelectedSuggestion", - "insertSnippet", - "leaveSnippet", - "editor.action.insertSnippet", - "jumpToNextSnippetPlaceholder", - "jumpToPrevSnippetPlaceholder", "workbench.action.showCommands", "showPrevParameterHint", "showNextParameterHint" @@ -39,6 +23,39 @@ [ "editor.action.clipboardCutAction", "document [!kb-macro.headOfLine]selection clipboard" ], [ "editor.action.clipboardPasteAction", "document selection" ] ], + "recordOptions": [ + [ "editor.action.inlineSuggest.showNext", "side-effect" ], + [ "editor.action.inlineSuggest.showPrevious", "side-effect" ], + [ "editor.action.inlineSuggest.commit", "side-effect" ], + [ "editor.action.inlineSuggest.hide", "side-effect" ], + [ "editor.action.inlineSuggest.trigger", "side-effect" ], + + [ "editor.action.triggerSuggest", "side-effect" ], + [ "hideSuggestWidget", "side-effect" ], + [ "insertNextSuggestion", "side-effect" ], + [ "insertPrevSuggestion", "side-effect" ], + [ "selectFirstSuggestion", "side-effect" ], + [ "selectLastSuggestion", "side-effect" ], + [ "selectNextSuggestion", "side-effect" ], + [ "selectPrevSuggestion", "side-effect" ], + [ "selectNextPageSuggestion", "side-effect" ], + [ "selectPrevPageSuggestion", "side-effect" ], + [ "toggleExplainMode", "side-effect" ], + [ "toggleSuggestionDetails", "side-effect" ], + [ "toggleSuggestionFocus", "side-effect" ], + [ "acceptSelectedSuggestion", "side-effect" ], + [ "acceptSelectedSuggestionOnEnter", "side-effect" ], + [ "acceptAlternativeSelectedSuggestion", "side-effect" ], + [ "editor.action.resetSuggestSize", "side-effect" ], + + [ "insertSnippet", "side-effect" ], + [ "acceptSnippet", "side-effect" ], + [ "leaveSnippet", "side-effect" ], + [ "editor.action.insertSnippet", "side-effect" ], + [ "editor.action.showSnippets", "side-effect" ], + [ "jumpToNextSnippetPlaceholder", "side-effect" ], + [ "jumpToPrevSnippetPlaceholder", "side-effect" ] + ], "header": [ { "key": "enter", diff --git a/package.json b/package.json index 1c09b89d..42ba8f9f 100644 --- a/package.json +++ b/package.json @@ -191,7 +191,11 @@ }, { "key": "shift+escape", - "command": "leaveSnippet", + "command": "kb-macro.wrap", + "args": { + "command": "leaveSnippet", + "record": "side-effect" + }, "when": "kb-macro.recording && editorTextFocus && inSnippetMode" }, { @@ -220,7 +224,11 @@ }, { "key": "shift+escape", - "command": "hideSuggestWidget", + "command": "kb-macro.wrap", + "args": { + "command": "hideSuggestWidget", + "record": "side-effect" + }, "when": "kb-macro.recording && suggestWidgetVisible && textInputFocus" }, { @@ -331,7 +339,8 @@ "key": "escape", "command": "kb-macro.wrap", "args": { - "command": "editor.action.inlineSuggest.hide" + "command": "editor.action.inlineSuggest.hide", + "record": "side-effect" }, "when": "kb-macro.recording && inlineSuggestionVisible" }, @@ -425,7 +434,11 @@ }, { "key": "escape", - "command": "leaveSnippet", + "command": "kb-macro.wrap", + "args": { + "command": "leaveSnippet", + "record": "side-effect" + }, "when": "kb-macro.recording && editorTextFocus && inSnippetMode" }, { @@ -462,7 +475,11 @@ }, { "key": "escape", - "command": "hideSuggestWidget", + "command": "kb-macro.wrap", + "args": { + "command": "hideSuggestWidget", + "record": "side-effect" + }, "when": "kb-macro.recording && suggestWidgetVisible && textInputFocus" }, { @@ -660,7 +677,11 @@ }, { "key": "cmd+down", - "command": "selectNextSuggestion", + "command": "kb-macro.wrap", + "args": { + "command": "selectNextSuggestion", + "record": "side-effect" + }, "when": "kb-macro.recording && suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus" }, { @@ -745,7 +766,11 @@ }, { "key": "down", - "command": "selectNextSuggestion", + "command": "kb-macro.wrap", + "args": { + "command": "selectNextSuggestion", + "record": "side-effect" + }, "when": "kb-macro.recording && suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus" }, { @@ -1060,7 +1085,11 @@ }, { "key": "pagedown", - "command": "selectNextPageSuggestion", + "command": "kb-macro.wrap", + "args": { + "command": "selectNextPageSuggestion", + "record": "side-effect" + }, "when": "kb-macro.recording && suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus" }, { @@ -1138,7 +1167,11 @@ }, { "key": "pageup", - "command": "selectPrevPageSuggestion", + "command": "kb-macro.wrap", + "args": { + "command": "selectPrevPageSuggestion", + "record": "side-effect" + }, "when": "kb-macro.recording && suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus" }, { @@ -1289,7 +1322,11 @@ }, { "key": "cmd+up", - "command": "selectPrevSuggestion", + "command": "kb-macro.wrap", + "args": { + "command": "selectPrevSuggestion", + "record": "side-effect" + }, "when": "kb-macro.recording && suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus" }, { @@ -1358,7 +1395,11 @@ }, { "key": "up", - "command": "selectPrevSuggestion", + "command": "kb-macro.wrap", + "args": { + "command": "selectPrevSuggestion", + "record": "side-effect" + }, "when": "kb-macro.recording && suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus" }, { @@ -1632,19 +1673,28 @@ }, { "key": "shift+tab", - "command": "jumpToPrevSnippetPlaceholder", + "command": "kb-macro.wrap", + "args": { + "command": "jumpToPrevSnippetPlaceholder", + "record": "side-effect" + }, "when": "kb-macro.recording && editorTextFocus && hasPrevTabstop && inSnippetMode" }, { "key": "shift+tab", - "command": "acceptAlternativeSelectedSuggestion", + "command": "kb-macro.wrap", + "args": { + "command": "acceptAlternativeSelectedSuggestion", + "record": "side-effect" + }, "when": "kb-macro.recording && suggestWidgetVisible && textInputFocus" }, { "key": "shift+tab", "command": "kb-macro.wrap", "args": { - "command": "insertPrevSuggestion" + "command": "insertPrevSuggestion", + "record": "side-effect" }, "when": "kb-macro.recording && hasOtherSuggestions && textInputFocus && !inSnippetMode && !suggestWidgetVisible && config.editor.tabCompletion == 'on'" }, @@ -1675,7 +1725,11 @@ }, { "key": "ctrl+down", - "command": "selectNextSuggestion", + "command": "kb-macro.wrap", + "args": { + "command": "selectNextSuggestion", + "record": "side-effect" + }, "when": "kb-macro.recording && !isMac && suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus" }, { @@ -1773,7 +1827,11 @@ }, { "key": "ctrl+up", - "command": "selectPrevSuggestion", + "command": "kb-macro.wrap", + "args": { + "command": "selectPrevSuggestion", + "record": "side-effect" + }, "when": "kb-macro.recording && !isMac && suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus" }, { @@ -1856,17 +1914,29 @@ }, { "key": "tab", - "command": "insertSnippet", + "command": "kb-macro.wrap", + "args": { + "command": "insertSnippet", + "record": "side-effect" + }, "when": "kb-macro.recording && editorTextFocus && hasSnippetCompletions && !editorTabMovesFocus && !inSnippetMode" }, { "key": "tab", - "command": "jumpToNextSnippetPlaceholder", + "command": "kb-macro.wrap", + "args": { + "command": "jumpToNextSnippetPlaceholder", + "record": "side-effect" + }, "when": "kb-macro.recording && editorTextFocus && hasNextTabstop && inSnippetMode" }, { "key": "tab", - "command": "acceptSelectedSuggestion", + "command": "kb-macro.wrap", + "args": { + "command": "acceptSelectedSuggestion", + "record": "side-effect" + }, "when": "kb-macro.recording && suggestWidgetVisible && textInputFocus" }, { @@ -1881,7 +1951,8 @@ "key": "tab", "command": "kb-macro.wrap", "args": { - "command": "insertNextSuggestion" + "command": "insertNextSuggestion", + "record": "side-effect" }, "when": "kb-macro.recording && hasOtherSuggestions && textInputFocus && !inSnippetMode && !suggestWidgetVisible && config.editor.tabCompletion == 'on'" }, @@ -1889,7 +1960,8 @@ "key": "tab", "command": "kb-macro.wrap", "args": { - "command": "editor.action.inlineSuggest.commit" + "command": "editor.action.inlineSuggest.commit", + "record": "side-effect" }, "when": "kb-macro.recording && inlineSuggestionHasIndentationLessThanTabSize && inlineSuggestionVisible && !editorTabMovesFocus" }, @@ -2032,7 +2104,11 @@ }, { "key": "shift+enter", - "command": "acceptAlternativeSelectedSuggestion", + "command": "kb-macro.wrap", + "args": { + "command": "acceptAlternativeSelectedSuggestion", + "record": "side-effect" + }, "when": "kb-macro.recording && suggestWidgetVisible && textInputFocus" }, { @@ -2337,7 +2413,11 @@ }, { "key": "enter", - "command": "acceptSelectedSuggestion", + "command": "kb-macro.wrap", + "args": { + "command": "acceptSelectedSuggestion", + "record": "side-effect" + }, "when": "kb-macro.recording && acceptSuggestionOnEnter && suggestWidgetVisible && suggestionMakesTextEdit && textInputFocus" }, { @@ -2854,9 +2934,13 @@ }, { "key": "ctrl+/", - "command": "toggleExplainMode", - "when": "kb-macro.recording && suggestWidgetVisible", - "mac": "cmd+/" + "mac": "cmd+/", + "command": "kb-macro.wrap", + "args": { + "command": "toggleExplainMode", + "record": "side-effect" + }, + "when": "kb-macro.recording && suggestWidgetVisible" }, { "key": "ctrl+/", @@ -3099,7 +3183,8 @@ "key": "alt+]", "command": "kb-macro.wrap", "args": { - "command": "editor.action.inlineSuggest.showNext" + "command": "editor.action.inlineSuggest.showNext", + "record": "side-effect" }, "when": "kb-macro.recording && inlineSuggestionVisible && !editorReadonly" }, @@ -3107,7 +3192,8 @@ "key": "alt+[", "command": "kb-macro.wrap", "args": { - "command": "editor.action.inlineSuggest.showPrevious" + "command": "editor.action.inlineSuggest.showPrevious", + "record": "side-effect" }, "when": "kb-macro.recording && inlineSuggestionVisible && !editorReadonly" }, @@ -3816,24 +3902,40 @@ }, { "key": "ctrl+i", - "command": "editor.action.triggerSuggest", - "when": "kb-macro.recording && editorHasCompletionItemProvider && textInputFocus && !editorReadonly", - "mac": "cmd+i" + "mac": "cmd+i", + "command": "kb-macro.wrap", + "args": { + "command": "editor.action.triggerSuggest", + "record": "side-effect" + }, + "when": "kb-macro.recording && editorHasCompletionItemProvider && textInputFocus && !editorReadonly" }, { "key": "ctrl+i", - "command": "toggleSuggestionDetails", - "when": "kb-macro.recording && suggestWidgetVisible && textInputFocus", - "mac": "cmd+i" + "mac": "cmd+i", + "command": "kb-macro.wrap", + "args": { + "command": "toggleSuggestionDetails", + "record": "side-effect" + }, + "when": "kb-macro.recording && suggestWidgetVisible && textInputFocus" }, { "key": "ctrl+space", - "command": "editor.action.triggerSuggest", + "command": "kb-macro.wrap", + "args": { + "command": "editor.action.triggerSuggest", + "record": "side-effect" + }, "when": "kb-macro.recording && editorHasCompletionItemProvider && textInputFocus && !editorReadonly" }, { "key": "ctrl+space", - "command": "toggleSuggestionDetails", + "command": "kb-macro.wrap", + "args": { + "command": "toggleSuggestionDetails", + "record": "side-effect" + }, "when": "kb-macro.recording && suggestWidgetVisible && textInputFocus" }, { @@ -4340,9 +4442,13 @@ }, { "key": "ctrl+pagedown", - "command": "selectNextPageSuggestion", - "when": "kb-macro.recording && suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus", - "mac": "cmd+pagedown" + "mac": "cmd+pagedown", + "command": "kb-macro.wrap", + "args": { + "command": "selectNextPageSuggestion", + "record": "side-effect" + }, + "when": "kb-macro.recording && suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus" }, { "key": "ctrl+pagedown", @@ -4364,9 +4470,13 @@ }, { "key": "ctrl+pageup", - "command": "selectPrevPageSuggestion", - "when": "kb-macro.recording && suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus", - "mac": "cmd+pageup" + "mac": "cmd+pageup", + "command": "kb-macro.wrap", + "args": { + "command": "selectPrevPageSuggestion", + "record": "side-effect" + }, + "when": "kb-macro.recording && suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus" }, { "key": "ctrl+pageup", @@ -4388,7 +4498,11 @@ }, { "key": "ctrl+alt+space", - "command": "toggleSuggestionFocus", + "command": "kb-macro.wrap", + "args": { + "command": "toggleSuggestionFocus", + "record": "side-effect" + }, "when": "kb-macro.recording && suggestWidgetVisible && textInputFocus" }, { @@ -6679,7 +6793,11 @@ }, { "key": "ctrl+n", - "command": "selectNextSuggestion", + "command": "kb-macro.wrap", + "args": { + "command": "selectNextSuggestion", + "record": "side-effect" + }, "when": "kb-macro.recording && isMac && suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus" }, { @@ -6817,7 +6935,11 @@ }, { "key": "ctrl+p", - "command": "selectPrevSuggestion", + "command": "kb-macro.wrap", + "args": { + "command": "selectPrevSuggestion", + "record": "side-effect" + }, "when": "kb-macro.recording && isMac && suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus" }, { @@ -7373,7 +7495,11 @@ }, { "key": "alt+escape", - "command": "editor.action.triggerSuggest", + "command": "kb-macro.wrap", + "args": { + "command": "editor.action.triggerSuggest", + "record": "side-effect" + }, "when": "kb-macro.recording && isMac && editorHasCompletionItemProvider && textInputFocus && !editorReadonly" }, {