Skip to content

Update Positron editor actions #706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/vscode/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## 1.122.0 (unreleased)

- Change controls on Positron editor action bar and fix "Render on Save" behavior (<https://github.com/quarto-dev/quarto/pull/706>).

## 1.121.0 (Release on 2025-05-02)

- Add new controls for Positron editor action bar (<https://github.com/quarto-dev/quarto/pull/698>).
Expand Down
17 changes: 11 additions & 6 deletions apps/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@
"enablement": "editorLangId == quarto",
"actionBarOptions": {
"controlType": "checkbox",
"checked": "((activeCustomEditorId == 'quarto.visualEditor' || quarto.editor.type == quarto) && quarto.editor.renderOnSave) || ((activeCustomEditorId == 'quarto.visualEditor' || quarto.editor.type == 'quarto-shiny') && quarto.editor.renderOnSaveShiny)"
"checked": "(quarto.editor.type == quarto && quarto.editor.renderOnSave) || (quarto.editor.type == 'quarto-shiny' && quarto.editor.renderOnSaveShiny)"
}
},
{
Expand Down Expand Up @@ -634,16 +634,21 @@
}
],
"menus": {
"editor/actions/right": [
"editor/actions/left": [
{
"command": "quarto.preview",
"when": "editorLangId == quarto || editorLangId == markdown || activeCustomEditorId == 'quarto.visualEditor'",
"group": "0_preview"
},
{
"command": "quarto.toggleRenderOnSave",
"when": "(activeCustomEditorId == 'quarto.visualEditor' || editorLangId == quarto) && (quarto.editor.type == quarto || quarto.editor.type == 'quarto-shiny')",
"group": "Quarto"
"when": "editorLangId == quarto || editorLangId == markdown || activeCustomEditorId == 'quarto.visualEditor'",
"group": "0_preview"
},
{
"command": "quarto.toggleEditMode",
"when": "(activeCustomEditorId == 'quarto.visualEditor' || editorLangId == quarto) && (quarto.editor.type == quarto || quarto.editor.type == 'quarto-shiny')",
"group": "Quarto"
"when": "editorLangId == quarto || editorLangId == markdown || activeCustomEditorId == 'quarto.visualEditor'",
"group": "1_editor_mode"
}
],
"editor/context": [
Expand Down
5 changes: 4 additions & 1 deletion apps/vscode/src/providers/context-keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ export function activateContextKeySetter(
const activeEditor = vscode.window.activeTextEditor;
if (activeEditor) {
debounce(
() => setLanguageContextKeys(activeEditor, engine),
() => {
setEditorContextKeys(activeEditor, engine)
setLanguageContextKeys(activeEditor, engine)
},
debounceOnDidChangeDocumentMs
)();
}
Expand Down