Skip to content

Commit

Permalink
🐛 #1367 (!suggestWidgetVisible || config.editor.acceptSuggestionOnEnt…
Browse files Browse the repository at this point in the history
…er == 'off');

also #1358 follow-up
  • Loading branch information
yzhang-gh committed Dec 25, 2023
1 parent 54a59fe commit f5f7405
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 18 deletions.
40 changes: 22 additions & 18 deletions package.json
Expand Up @@ -6,7 +6,7 @@
"version": "3.5.1",
"publisher": "yzhang",
"engines": {
"vscode": "^1.72.0"
"vscode": "^1.77.0"
},
"categories": [
"Programming Languages",
Expand All @@ -28,7 +28,6 @@
"onLanguage:markdown",
"onLanguage:rmd",
"onLanguage:quarto",
"onCommand:markdown.extension.printToHtmlBatch",
"workspaceContains:README.md"
],
"main": "./dist/node/main.js",
Expand Down Expand Up @@ -183,29 +182,29 @@
],
"editor/title": [
{
"when": "editorLangId =~ /^markdown$|^rmd$|^quarto$/",
"when": "editorLangId =~ /^markdown$|^rmd$|^quarto$/ && config.markdown.extension.showActionButtons",
"command": "markdown.extension.editing.toggleBold",
"group": "navigation@1_1"
"group": "navigation@1"
},
{
"when": "editorLangId =~ /^markdown$|^rmd$|^quarto$/",
"when": "editorLangId =~ /^markdown$|^rmd$|^quarto$/ && config.markdown.extension.showActionButtons",
"command": "markdown.extension.editing.toggleItalic",
"group": "navigation@1_2"
},
{
"when": "editorLangId =~ /^markdown$|^rmd$|^quarto$/",
"command": "markdown.extension.checkTaskList",
"group": "navigation@1_3"
"group": "navigation@2"
},
{
"when": "editorLangId =~ /^markdown$|^rmd$|^quarto$/",
"when": "editorLangId =~ /^markdown$|^rmd$|^quarto$/ && config.markdown.extension.showActionButtons",
"command": "markdown.extension.editing.toggleCodeSpan",
"group": "navigation@1_4"
"group": "navigation@3"
},
{
"when": "editorLangId =~ /^markdown$|^rmd$|^quarto$/",
"when": "editorLangId =~ /^markdown$|^rmd$|^quarto$/ && config.markdown.extension.showActionButtons",
"command": "markdown.extension.editing.toggleList",
"group": "navigation@1_5"
"group": "navigation@4"
},
{
"when": "editorLangId =~ /^markdown$|^rmd$|^quarto$/ && config.markdown.extension.showActionButtons",
"command": "markdown.extension.checkTaskList",
"group": "navigation@5"
}
]
},
Expand Down Expand Up @@ -248,18 +247,18 @@
{
"command": "markdown.extension.onEnterKey",
"key": "enter",
"when": "editorTextFocus && !editorReadonly && editorLangId =~ /^markdown$|^rmd$|^quarto$/ && !suggestWidgetVisible && !editorHasMultipleSelections && vim.mode != 'Normal' && vim.mode != 'Visual' && vim.mode != 'VisualBlock' && vim.mode != 'VisualLine' && vim.mode != 'SearchInProgressMode' && vim.mode != 'CommandlineInProgress' && vim.mode != 'Replace' && vim.mode != 'EasyMotionMode' && vim.mode != 'EasyMotionInputMode' && vim.mode != 'SurroundInputMode' && !markdown.extension.editor.cursor.inFencedCodeBlock && !markdown.extension.editor.cursor.inMathEnv"
"when": "editorTextFocus && !editorReadonly && editorLangId =~ /^markdown$|^rmd$|^quarto$/ && (!suggestWidgetVisible || config.editor.acceptSuggestionOnEnter == 'off') && !editorHasMultipleSelections && vim.mode != 'Normal' && vim.mode != 'Visual' && vim.mode != 'VisualBlock' && vim.mode != 'VisualLine' && vim.mode != 'SearchInProgressMode' && vim.mode != 'CommandlineInProgress' && vim.mode != 'Replace' && vim.mode != 'EasyMotionMode' && vim.mode != 'EasyMotionInputMode' && vim.mode != 'SurroundInputMode' && !markdown.extension.editor.cursor.inFencedCodeBlock && !markdown.extension.editor.cursor.inMathEnv"
},
{
"command": "markdown.extension.onCtrlEnterKey",
"key": "ctrl+enter",
"mac": "cmd+enter",
"when": "editorTextFocus && !editorReadonly && editorLangId =~ /^markdown$|^rmd$|^quarto$/ && !suggestWidgetVisible && !editorHasMultipleSelections && !markdown.extension.editor.cursor.inFencedCodeBlock && !markdown.extension.editor.cursor.inMathEnv"
"when": "editorTextFocus && !editorReadonly && editorLangId =~ /^markdown$|^rmd$|^quarto$/ && (!suggestWidgetVisible || config.editor.acceptSuggestionOnEnter == 'off') && !editorHasMultipleSelections && !markdown.extension.editor.cursor.inFencedCodeBlock && !markdown.extension.editor.cursor.inMathEnv"
},
{
"command": "markdown.extension.onShiftEnterKey",
"key": "shift+enter",
"when": "editorTextFocus && !editorReadonly && editorLangId =~ /^markdown$|^rmd$|^quarto$/ && !suggestWidgetVisible && !editorHasMultipleSelections && !markdown.extension.editor.cursor.inFencedCodeBlock && !markdown.extension.editor.cursor.inMathEnv"
"when": "editorTextFocus && !editorReadonly && editorLangId =~ /^markdown$|^rmd$|^quarto$/ && (!suggestWidgetVisible || config.editor.acceptSuggestionOnEnter == 'off') && !editorHasMultipleSelections && !markdown.extension.editor.cursor.inFencedCodeBlock && !markdown.extension.editor.cursor.inMathEnv"
},
{
"command": "markdown.extension.onTabKey",
Expand Down Expand Up @@ -490,6 +489,11 @@
"default": true,
"description": "%config.print.validateUrls.description%"
},
"markdown.extension.showActionButtons": {
"type": "boolean",
"default": false,
"markdownDeprecationMessage": "%config.showActionButtons.description%"
},
"markdown.extension.syntax.decorations": {
"type": "boolean",
"default": null,
Expand Down
1 change: 1 addition & 0 deletions package.nls.json
Expand Up @@ -40,6 +40,7 @@
"config.print.pureHtml.description": "Print current document to pure HTML (without any stylesheets).",
"config.print.theme": "Theme of the exported HTML. Only affects code blocks.",
"config.print.validateUrls.description": "Enable/disable URL validation when printing.",
"config.showActionButtons.description": "Show buttons (e.g. toggle bold, italic) on the editor toolbar.",
"config.syntax.decorations.description": "(**Deprecated**) Use `#markdown.extension.theming.decoration.renderCodeSpan#` instead. See <https://github.com/yzhang-gh/vscode-markdown/issues/888> for details.",
"config.syntax.decorationFileSizeLimit.description": "If a file is larger than this size (in byte/B), we won't attempt to render syntax decorations.",
"config.syntax.plainTheme.description": "(**Experimental**) Report issue at <https://github.com/yzhang-gh/vscode-markdown/issues/185>.",
Expand Down

0 comments on commit f5f7405

Please sign in to comment.