Skip to content

VS Code extension ​

The extension lives in the repository, in vscode-quantum/. It is not published on the Visual Studio Marketplace; to use it, build it and run it from source (it needs Node.js):

bash
cd vscode-quantum
npm install
npm run compile

Then open the vscode-quantum folder in VS Code and press F5: a second VS Code window (the Extension Development Host) opens with the extension loaded, and .q files get the language features below.

Requires VS Code ^1.74.0. Features that run Quantum use the quantum found through the settings below.

Commands ​

CommandTitle
quantum.openPreviewOpen Preview
quantum.openPreviewToSideOpen Preview to the Side
quantum.refreshPreviewRefresh Preview
quantum.togglePreviewViewToggle HTML/Rendered View
quantum.refreshComponentTreeRefresh Component Tree
quantum.goToDefinitionGo to Definition
quantum.runRun Quantum File
quantum.startServerStart Development Server
quantum.quickRunQuick Run
quantum.runTaskRun Task...
quantum.explainErrorExplain Error
quantum.suggestFixSuggest Fix
quantum.suggestFixWithAISuggest Fix with AI
quantum.lookupDocumentationLookup Documentation

Keyboard shortcuts ​

KeysCommand
ctrl+shift+rquantum.run
ctrl+k vquantum.openPreviewToSide
ctrl+shift+dquantum.lookupDocumentation

Settings ​

SettingDefaultDescription
quantum.validation.enabledtrueEnable/disable validation of Quantum files
quantum.validation.showWarningstrueShow warnings in addition to errors
quantum.completion.enabledtrueEnable/disable code completion
quantum.hover.enabledtrueEnable/disable hover documentation
quantum.pythonPath"python"Path to Python executable
quantum.frameworkPath""Path to Quantum framework installation
quantum.serverPort8080Port for development server
quantum.buildOutputDir"./dist"Output directory for builds
quantum.preview.autoRefreshtrueAuto-refresh preview on save
quantum.preview.refreshDelay300Delay in ms before refreshing preview
quantum.ai.provider"anthropic"AI provider for code assistance
quantum.ai.apiKey""API key for Anthropic (Claude)
quantum.ai.model"claude-sonnet-4-20250514"Model to use for Anthropic
quantum.ai.openaiApiKey""API key for OpenAI
quantum.ai.openaiModel"gpt-4"Model to use for OpenAI
quantum.ai.ollamaUrl"http://localhost:11434"URL for local Ollama server
quantum.ai.ollamaModel"llama2"Model to use for Ollama

Snippets ​

Type the prefix in a .q file and accept the suggestion.

PrefixInserts
qactionForm action handler
qappCreate a new Quantum application
qcompCreate a new Quantum component
qdispatchPublish an event
qdumpDebug dump variable
qfileFile upload handling
qflashFlash message
qfuncDefine a function
qfuncpDefine a function with parameters
qifConditional if block
qifeConditional if-else block
qifeeConditional if-elseif-else block
qimportImport a component
qinvokeHTTP API invocation
qllmLLM invocation
qllmcLLM chat conversation
qlogLog a message
qloopCreate a numeric range loop
qloopaLoop over an array
qloopqLoop over query results
qmailSend email
qoneventEvent handler
qparamDefine a parameter
qqueryDatabase query
qquerypDatabase query with parameters
qredirectRedirect response
qsetSet a variable value
qsettSet a typed variable
qslotContent projection slot
qtransDatabase transaction
uiaccordCollapsible accordion
uialertAlert notification
uianimAnimation wrapper
uiavatarUser avatar
uibadgeStatus badge
uibreadNavigation breadcrumbs
uibtnClickable button
uicardCard component
uichartSimple chart
uicheckCheckbox input
uidropdownDropdown menu
uiformForm with validation
uiformitemForm field with label
uigridCSS grid container
uihboxHorizontal flex container
uiimgImage display
uiinputText input field
uiinputvInput with validation
uilinkHyperlink
uilistRepeating list
uiloadLoading indicator
uimodalModal dialog
uipagePagination controls
uipanelBordered panel with title
uiprogressProgress bar
uiruleHorizontal separator
uiselectDropdown select
uiskelLoading skeleton
uispacerFlexible space
uiswitchToggle switch
uitableData table
uitabsTabbed content
uitextText display
uithemeTheme configuration
uitooltipTooltip wrapper
uivalidCustom validator rule
uivboxVertical flex container
uiwinUI Window container

The language server behind completion and diagnostics is also usable from other editors: see LSP server.

MIT Licensed · Built with VitePress