diff --git a/package.json b/package.json index a7148d1..d0a659c 100644 --- a/package.json +++ b/package.json @@ -91,6 +91,35 @@ ], "default": 300 }, + "textmarker.commandsOnContextMenu": { + "description": "Commands appear on the context menu", + "type": "object", + "properties": { + "highlightUsingRegex": {"type": "boolean"}, + "toggleHighlight": {"type": "boolean"}, + "unhighlight": {"type": "boolean"}, + "toggleCaseSensitivity": {"type": "boolean"}, + "toggleWholeMatch": {"type": "boolean"}, + "clearAllHighlight": {"type": "boolean"}, + "saveAllHighlights": {"type": "boolean"}, + "updateHighlight": {"type": "boolean"}, + "goToNextHighlight": {"type": "boolean"}, + "goToPreviousHighlight": {"type": "boolean"} + }, + "default": { + "highlightUsingRegex": false, + "toggleHighlight": true, + "unhighlight": false, + "toggleCaseSensitivity": false, + "toggleWholeMatch": false, + "clearAllHighlight": false, + "saveAllHighlights": false, + "updateHighlight": true, + "goToNextHighlight": true, + "goToPreviousHighlight": true + }, + "additionalProperties": false + }, "textmarker.savedHighlights": { "description": "Highlights that get applied when opening editor", "type": "array", @@ -199,22 +228,52 @@ { "command": "textmarker.toggleHighlight", "group": "2_textmarker@1", - "when": "editorTextFocus" + "when": "editorTextFocus && config.textmarker.commandsOnContextMenu.toggleHighlight" }, { "command": "textmarker.updateHighlight", "group": "2_textmarker@2", - "when": "editorTextFocus" + "when": "editorTextFocus && config.textmarker.commandsOnContextMenu.updateHighlight" }, { "command": "textmarker.goToNextHighlight", "group": "2_textmarker@3", - "when": "editorTextFocus" + "when": "editorTextFocus && config.textmarker.commandsOnContextMenu.goToNextHighlight" }, { "command": "textmarker.goToPreviousHighlight", "group": "2_textmarker@4", - "when": "editorTextFocus" + "when": "editorTextFocus && config.textmarker.commandsOnContextMenu.goToPreviousHighlight" + }, + { + "command": "textmarker.highlightUsingRegex", + "group": "2_textmarker@5", + "when": "editorTextFocus && config.textmarker.commandsOnContextMenu.highlightUsingRegex" + }, + { + "command": "textmarker.unhighlight", + "group": "2_textmarker@6", + "when": "editorTextFocus && config.textmarker.commandsOnContextMenu.unhighlight" + }, + { + "command": "textmarker.toggleCaseSensitivity", + "group": "2_textmarker@7", + "when": "editorTextFocus && config.textmarker.commandsOnContextMenu.toggleCaseSensitivity" + }, + { + "command": "textmarker.toggleWholeMatch", + "group": "2_textmarker@8", + "when": "editorTextFocus && config.textmarker.commandsOnContextMenu.toggleWholeMatch" + }, + { + "command": "textmarker.clearAllHighlight", + "group": "2_textmarker@9", + "when": "editorTextFocus && config.textmarker.commandsOnContextMenu.clearAllHighlight" + }, + { + "command": "textmarker.saveAllHighlights", + "group": "2_textmarker@10", + "when": "editorTextFocus && config.textmarker.commandsOnContextMenu.saveAllHighlights" } ] }