q language server, written in Rust.
Project description
q Professional
Quick start
- Open the q Professional activity bar panel and add a process (Add Process).
- Run Connect to Process from the Command Palette (ctrl+shift+p).
- Open a
.qor.kfile and press ctrl+r to query the current selection.
Use Switch Query Mode to change between Console, Grid, and Visualization output.
Features
Editor
- Syntax highlighting for q and k
- q notebook (
*.qnb) with Console, Grid, and Visualization cell output - Process tree grouped by tags
- Process Explorer for live server variables
- Query History
Query modes
- Console — text output in an output channel (default)
- Grid — filter and sort tables in a webview (ag-grid-community & plotly); nanosecond timestamp precision
- Visualization — pivot and virtualize tables (perspective); millisecond timestamp precision
Language server
Powered by tree-sitter. Works offline on local source files.
- Linter and formatter
- Rename symbol (F2)
- Go to definition (F12)
- Go to references (shift+F12)
- Workspace symbol (ctrl+T)
- Document highlight and document symbol (ctrl+shift+O)
- Completion (local identifiers, kdb+ process symbols, column names)
- Completion resolve, signature help, semantic highlights, call hierarchy
See the changelog.
For Neovim setup using the standalone language server, see neovim.md.
Configuration
- User settings: ctrl+,, then filter by
q-pro. - Workspace settings: Command Palette →
Preferences: Open Workspace Settings, then filter byq-pro.
| configuration | type | default value | description |
|---|---|---|---|
q-lang-server.sourceFiles.includeGlob |
array | ["**/src/**/*.q","**/src/**/*.k"] |
globs for source files to analyze |
q-lang-server.sourceFiles.ignoreGlob |
array | ["**/build/**","**/node_modules/**"] |
globs to exclude from analysis |
q-lang-server.trace.server |
string | off |
LSP trace level: off, messages, or verbose |
q-processes.cfg.queryMode |
string | Console |
query mode: Console, Grid, or Visualization |
q-processes.cfg.queryGridDecimals |
number | 3 |
decimal places in Grid mode |
q-discovery-server.cfg.refreshInterval |
number | 30 |
discovery server refresh interval (minutes) |
q-terminal.cfg.qBinary |
string | q |
q executable name or full path |
q-terminal.cfg.envPath |
string | '' |
environment file (relative or absolute path) |
q-process-explorer.cfg.prevQueryLimit |
number | 5 |
preview query limit in Process Explorer |
q-process-explorer.cfg.autoRefresh |
boolean | false |
auto-refresh Process Explorer |
q-process-explorer.cfg.excludedNamespaces |
array | ["q","Q","h","j","o","s"] |
namespaces excluded from Process Explorer |
q-output.cfg.autoClear |
boolean | false |
clear output before each query |
q-output.cfg.ignoreNullReturn |
boolean | false |
suppress null returns in non-Console modes |
q-output.cfg.includeQuery |
boolean | false |
include the query text in output |
q-output.cfg.consoleSize |
string | '50 160' |
console size for table output |
q-kuki.kukiRoot |
string | '' |
path to kuki root for additional built-in function analysis (defaults to ~/kuki or $KUKI_PATH) |
Process lists can be imported and exported via kest.json (schema). kuki configuration uses kuki.json (schema).
Language server
The offline language server analyzes q and k files matched by q-lang-server.sourceFiles.includeGlob. To improve parsing accuracy, add ; to mark the end of a statement when needed.
Linter and formatter directives
// q-lang-server-ignore-linter— ignore linter for the following block// q-lang-server-ignore-formatter— ignore formatter for the following block
q Notebook
Files with the .qnb extension use the notebook feature. Output format follows the active query mode:
| Query mode | Notebook output |
|---|---|
| Console | notebook console |
| Grid | notebook HTML |
| Visualization | notebook HTML |
Per-cell directives can override the global query mode: // @console, // @grid, // @chart <type>.
Charts
In Grid or Visualization mode, add a chart directive as the first comment in a cell and execute:
// @chart lines
([] date: .z.D + til 10; price: 100?1.0)
Supported chart types: lines, bar, scatter, histogram, heatmap.
Optional directives (one per line, after the chart type):
| Directive | Example | Description |
|---|---|---|
@height |
// @height 400 |
chart height in pixels (default 600) |
@width |
// @width 900 |
chart width in pixels (default 800) |
@title |
// @title my_chart |
chart title |
@barmode |
// @barmode stack |
bar/histogram mode: group, stack, etc. |
Limitations:
- the first non-numeric column is used as the label
- up to 9 series in line, bar, and histogram charts
- up to 4 series pairs in scatter charts
See examples/chart.qnb for full examples.
Panels
Open the q Professional activity bar to access these views.
Processes
Lists configured processes; click to switch the active connection. Processes are grouped into a tree by tags.
Tag colors:
- green —
dev,development - blue —
uat - red —
prd,prod
Use Import Processes / Export Processes to share process lists via kest.json.
Discovery Server
Configure a REST API endpoint that returns a list of {host: string, port: number, label: string}. Discovered processes appear in the Processes panel but are not saved to disk.
Process Explorer
Lists variables defined on the active kdb+ process. Use Preview to run a short query against a variable (limited by prevQueryLimit).
Query History
Records executed queries. Use Rerun Query History to repeat a past query.
Query modes
Run Switch Query Mode from the Command Palette to cycle modes, or set q-processes.cfg.queryMode in settings.
Visualization
Powered by perspective. Tables are shown in a webview; other result types still appear in the output channel. Table queries are limited to 10,000 rows by default. Click the flame icon in the Processes panel, or run Toggle Unlimited Query, to remove the limit. Note that Visualization supports millisecond timestamp precision only.
Grid
Powered by ag-grid-community and plotly. Tables are shown in a webview; other result types still appear in the output channel. Table queries are limited to 10,000 rows by default — use the flame icon or Toggle Unlimited Query to remove the limit. Grid supports nanosecond timestamp precision.
Console (default)
Writes results to an output channel. Set Console Size for Output (q-output.cfg.consoleSize) to control table formatting. For non-table output, use system "c rows columns" in q.
Commands
All commands are under the q-pro category in the Command Palette (ctrl+shift+p).
| Command | Description |
|---|---|
| Connect to Process | connect to the selected process |
| Disconnect to Process | disconnect from the active process |
| Switch Query Mode | cycle Console → Grid → Visualization |
| Toggle Unlimited Query | remove the 10,000-row table limit |
| Abort Current Query | stop the running query |
| Add / Edit / Delete Process | manage process entries |
| Import / Export Processes | load or save kest.json |
| Tag Process | assign tags to a process |
| Refresh Processes | reload the process list |
| Add / Edit / Delete Discovery Server | manage discovery endpoints |
| Reload Discovery Server | refresh discovered processes |
| Refresh Process Explorer | reload variables from the active process |
| Toggle Auto Refresh | enable periodic Process Explorer refresh |
| Preview | run a preview query on a Process Explorer item |
| Insert Active Connection Label | insert the active connection label at the cursor |
| Export Notebook | export the current q notebook |
| Run Code from Terminal | execute code from an integrated terminal |
| Settings | open q-pro settings |
| Rerun Query History | repeat a query from history |
Shortcuts
Default keybindings (when editing q files):
| Shortcut | Action |
|---|---|
| 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 customize shortcuts:
- ctrl+shift+p → Preferences: Open Keyboard Shortcuts
- Search for
q-pro
Tips
Enable auto-scrolling for the output channel
- ctrl+, → disable Output › Smart Scroll.
- Click the lock icon at the top-right of the output channel to enable auto-scrolling.
Disable word wrap in q Console output
Command Palette → Preferences: Open User Settings (JSON), then add:
"[q-console]": {
"editor.wordWrap": "off"
}
Highlight ATTENTION and TODO comments
Command Palette → Preferences: Open User Settings (JSON), then add:
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "comment.line.attention",
"settings": {
"fontStyle": "italic",
"foreground": "#B71C1C"
}
},
{
"scope": "comment.line.todo",
"settings": {
"fontStyle": "italic",
"foreground": "#2E7D32"
}
}
]
}
Special connection comment
Evaluating a comment line like /<=> quant,prod,local-1800 connects to the process labeled quant,prod,local-1800. Use Insert Active Connection Label to insert the label of the currently active connection.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file q_lang_server-1.0.0-py3-none-win_amd64.whl.
File metadata
- Download URL: q_lang_server-1.0.0-py3-none-win_amd64.whl
- Upload date:
- Size: 2.0 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22a9f2a8464697839a3eedf67b17d960b18b647f8968bf407d1240c4811dac21
|
|
| MD5 |
85326737e1b1b9d7a115e10a86d35624
|
|
| BLAKE2b-256 |
fecf9cbf2229bc224eeb3dd799e41c63b95b833ff40a4dd0b9f4ea8aa8745ef8
|
File details
Details for the file q_lang_server-1.0.0-py3-none-win32.whl.
File metadata
- Download URL: q_lang_server-1.0.0-py3-none-win32.whl
- Upload date:
- Size: 1.8 MB
- Tags: Python 3, Windows x86
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
814aef6762935c7b22770999049c233ea213808d0e3ec3bed1e50fb6278c76fa
|
|
| MD5 |
ef068262724e52d0f2e99bf79512b43c
|
|
| BLAKE2b-256 |
caa56b9a72da6cb372c635cdacd6915c78b6d736c8475a800b117cd0efad84ba
|
File details
Details for the file q_lang_server-1.0.0-py3-none-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: q_lang_server-1.0.0-py3-none-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 2.1 MB
- Tags: Python 3, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb3b53eb269d30a9b2c6f715b76b4ca46c5b1a3ee7630e3b67121c56efd1fde2
|
|
| MD5 |
a31ecfade8106785dfc4a783a80b3a8f
|
|
| BLAKE2b-256 |
69959a5c2834f1f502ced30e7b2570a4987b227b263a356f8f29621978343071
|
File details
Details for the file q_lang_server-1.0.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: q_lang_server-1.0.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 2.0 MB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
113c899dc3b8b96bae4819a189b70262d53cb876ef1481d7a2fd984ce196f4a7
|
|
| MD5 |
71212909729421e7e9508b47d18dbf83
|
|
| BLAKE2b-256 |
e2f58c7a484f699f540c4ecb40694fab404e8b254d3f6c2833a7bf7fa2dd142f
|
File details
Details for the file q_lang_server-1.0.0-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: q_lang_server-1.0.0-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.9 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de7ec3ee6753f69e95643b71a2494fcab179bdbf708337408e83bc22b2e29152
|
|
| MD5 |
3a75265e9087aa4aefd7b461026d1f35
|
|
| BLAKE2b-256 |
d177a64eb6eca03b829d88980fad5f1af69571876523b48a2596a2ef3eed203d
|
File details
Details for the file q_lang_server-1.0.0-py3-none-macosx_10_12_x86_64.whl.
File metadata
- Download URL: q_lang_server-1.0.0-py3-none-macosx_10_12_x86_64.whl
- Upload date:
- Size: 2.0 MB
- Tags: Python 3, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c4f69483c783d52267d82ac98aa37e55fbdcaf8186c7318a140266966379ae8
|
|
| MD5 |
f7b4f3d44740b639ac14472128eeb833
|
|
| BLAKE2b-256 |
947283d6f132e31233bf8c285712f23dfb75737bd51f39ff154be9bd657f67c9
|