Purchase a Subscription to use q Professional.
- For Individual - per user, monthly
- For Individual - per user, yearly
- For Organization - per user, yearly
The activation key will be sent by email within 2 business days.
This extension provides k and kdb+\q language support:
- k9 syntaxes
- q syntaxes
- q notebook(*.qnb)
- processes group by tags
- process explorer
- query mode
- grid powered by ag-grid-community & plotly
- visualization powered by perspective
- language server powered by tree-sitter
- linter
- formatter
- rename symbol (F2)
- go to definition (F12)
- go to reference (Shift+F12)
- workspace symbol (Ctrl+T)
- document highlight
- document symbol (Ctrl+Shift+O)
- completion
- identifiers defined in code
- identifiers defined on kdb+ process
- column names define on kdb+ process
- completion resolve
- signature help
- semantic highlights
- call hierarchy
See the change log.
- To configure globally, type ctrl+, to open Settings, filter the configuration by
k-pro
and change the following values. - To configure for workspace, type ctrl+shift+p, call
Preferences: Open Workspace Settings
, filter the configuration byk-pro
and change the following values.
configuration | type | default value | description |
---|---|---|---|
k-lang-server.sourceFiles.globsPattern | array | ["**/src/**/*.q","**/src/**/*.k"] |
source folder to be included |
k-lang-server.sourceFiles.ignorePattern | array | ["**/build","**/node_modules"] |
folder to be excluded |
k-processes.cfg.queryMode | string | Console |
query mode, Console, Grid or Visualization |
k-processes.cfg.queryGridDecimals | number | 3 |
decimals in Grid mode |
k-discovery-server.cfg.refreshInterval | number | 30 |
Discovery Server Refresh Interval(min) |
k-terminal.cfg.qBinary | string | q |
q executable file or full path |
k-terminal.cfg.envPath | string | '' |
environment file relative or absolute path |
k-process-explorer.cfg.prevQueryLimit | string | 5 |
k process explorer preview query limit |
k-process-explorer.cfg.autoRefresh | boolean | false |
k process explorer auto refresh |
k-process-explorer.cfg.excludedNamespaces | array | ["q","Q","j","o","h"] |
namespaced to be excluded from k process explorer |
k-output.cfg.autoClear | boolean | false |
auto clear output |
k-output.cfg.ignoreNullReturn | boolean | false |
ignore null return when using non-console mode |
k-output.cfg.includeQuery | boolean | false |
include query in output |
k-output.cfg.consoleSize | string | '50 160' |
console size for output |
The offline language server will analyze q and k source files in all 'src' folder. To increase precision, please insert ';' to indicated end of statement if necessary.
// k-pro-ignore-linter
: ignore linter for the following block of code// k-pro-ignore-formatter
: ignore formatter for the following block of code
Files with postfix *.qnb are using notebook feature. There are 2 output mode for q notebook, switch to following query mode for different output format
- Console -> notebook console
- Grid -> notebook html
- Visualization -> notebook html
Enable Grid or Visualization mode, insert // @chart lines
to a q cell as the first comment and execute.
Limitations:
- use the first non-number column as label
- support up to 9 series in line/bar/histogram chart
- support up to 4 pair of series in scatter chart
see examples here, chart.qnb
List processes, click to switch process. Generate tree structure from tags.
Special tag color:
- green: dev, development
- blue: uat
- red: prd, prod.
The url should be a REST API endpoint, which returns a list of {host:string, port:number, label:string}
. The returned list will be added to Processes panel, but it won't be saved on disk.
List variables defined on the active server.
Record query histories.
Type ctrl+shift+p and call k-pro: Switch Query Mode
to switch Query Console.
Visualization, powered by perspective, can pivot and virtualize table data. In Visualization mode, only table will be showed in a webview, but other result will still be in output. It will limit to 10000 rows when query a table, click the flame in PROCESSES panel , or call k-pro: Toggle Unlimited Query
, to remove 10000 rows limit. Be noted that, Visualization only supports millisecond precision.
Grid, powered by ag-grid-community and plotly, can filter and sort table data. In Grid mode, only table will be showed in a webview, but other result will still be in output. It will limit to 10000 rows when query a table, click the flame in PROCESSES panel , or call k-pro: Toggle Unlimited Query
, to remove 10000 rows limit. Grid supports nanosecond precision.
Output console to an output channel. Configure Console Size for Output
to change console size for table type output. For non-table type console size, use system "c rows columns"
to change console size.
Type ctrl+shift+p and call k-pro: Connect to Process
to connect to a process.
- ctrl+q: query current line
- ctrl+r: query selection
- ctrl+e: query block
- ctrl+shift+q: send current line to terminal
- ctrl+shift+r: send selection to terminal
- ctrl+shift+e: send block to terminal
To change shortcuts
- type ctrl+shift+p
- input "shortcut"
- open the Keyboard Shortcuts
- search for "k-pro".
- Type ctrl+comma(,), open Settings, disable
Output>Smart Scroll
. - Turn on Auto Scrolling by clicking a small locker icon on the right top of output channel.
Type ctrl+shift+p, call Open Setting(Json)
, and add following configuration.
"[Log]": {
"editor.wordWrap": "off"
}
There may be a conflict with other extensions. Disable or uninstall them and try again.
Type ctrl+shift+p, call Open Setting(Json)
, and add following configuration.
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope":"comment.line.attention",
"settings": {
"fontStyle": "italic",
"foreground": "#B71C1C"
}
},
{
"scope":"comment.line.todo",
"settings": {
"fontStyle": "italic",
"foreground": "#2E7D32"
}
}
]
}
Querying comment line /<=> quant,prod,local-1800
will connect to quant,prod,local-1800
.
Type ctrl+shift+p, call k-pro Insert Active Connection Label
to insert active connection label.