Skip to content

positron

This directory provides Talon integration for Positron, a next-generation data science IDE developed by Posit that is built on top of the VS Code extensible architecture. Because Positron shares its underlying engine with VS Code, these scripts leverage standard VS Code commands to control Positron's specialized data science panels, plots, and notebook features.

Component Overview

The files in this directory work together to detect the Positron application context, define IDE-specific voice commands, and implement cross-compatibility for Quarto Markdown (.qmd) files.

Application Definition

  • positron_mac.py declares the Positron application context on macOS. It targets the application bundle co.posit.positron and maps it to the global app: positron identifier. This allows Talon to activate the corresponding voice commands whenever Positron is the focused window.

IDE-Specific Navigation and Plots

  • positron.talon maps spoken commands to Positron's custom IDE features. Since Positron is built on VS Code, these commands invoke internal workbench actions via the user.vscode() API:
    • Panel Focus: Commands to focus specific IDE sections such as the console (panel console), HTML viewer/preview (sec preview), help pages (sec help), environment variables (sec variables), and data plots (sec plots).
    • Contextual Help: Commands like help that to display help at the cursor position.
    • Plot Management: Comprehensive commands for interacting with the plot pane, including copying, clearing, opening, refreshing, and navigating back and forth through generated plots.

Quarto Markdown (QMD) & Notebook Support

  • positron_vscode_qmd.talon provides specialized support for Quarto Markdown documents (.qmd). Because both VS Code and Positron use the Quarto extension, this file activates for both applications (app: vscode, app: positron) when editing a .qmd file. It includes commands to:
    • Navigate between code cells (cell next, cell last).
    • Run code cells dynamically (cell run, notebook run tail, notebook run).
    • Insert new code blocks (cell new).
    • Trigger document and report previews (quarto preview).