q-lang-server
Offline Language Server Protocol implementation for q and k, written in Rust and powered by tree-sitter.
The server binary is named qls.
Install
pip install q-lang-server
Or with uv:
uv pip install q-lang-server
This installs the qls executable on your PATH.
Features
- Diagnostics (linter)
- Document formatting
- Go to definition
- Find references
- Rename symbol (with prepare rename)
- Hover
- Document symbols and workspace symbols
- Document highlight
- Completion (with resolve)
- Signature help
- Semantic tokens
Source files are analyzed offline from the workspace. By default the server looks under **/src/**/*.q and **/src/**/*.k. Add ; to mark statement ends when needed for more accurate parsing.
Formatter
The formatter keeps lines within 100 characters and produces stable output — formatting an already formatted file changes nothing.
Long symbol lists are wrapped with a trailing , so each continuation line still joins into the same list:
longSyms: `symbol000`symbol001`symbol002`symbol003`symbol004`symbol005`symbol006`symbol007,
`symbol008`symbol009`symbol010`symbol011`symbol012`symbol013`symbol014`symbol015`symbol016;
Symbol lists inside q-sql phases are left as-is, since a , there separates columns or conditions.
Ignore directives
Place either comment above a block to skip analysis for that block:
// q-lang-server-ignore-linter
// q-lang-server-ignore-formatter
Editor setup
Neovim
Use chili-neovim for q/k syntax, process management, and LSP. It starts qls for .q / .k buffers by default.
- Install
qls(see above) and ensure it is on your$PATH. - Install chili-neovim with lazy.nvim:
Minimal:
{ "jshinonome/chili-neovim" }
With options and completion:
{
"jshinonome/chili-neovim",
main = "chili",
dependencies = {
"hrsh7th/nvim-cmp",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-vsnip",
"hrsh7th/vim-vsnip",
},
opts = {
qls = {
cmd = { "qls" },
filetypes = { "q" }, -- .q and .k
document_highlight = true,
format_on_save = true,
},
},
}
See the chili-neovim README for process config, commands, and keybindings.
Other editors
Any LSP client that can launch qls over stdio can use this server. Point the client at the qls binary and associate it with q and k filetypes.
Related
- chili-neovim — Neovim plugin for kdb+/q
- vscode-q — VS Code / Cursor extension that embeds this language server
- Changelog
License
Licensed under the Apache License, Version 2.0.
Release files for q-lang-server 1.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| q_lang_server-1.0.5-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| q_lang_server-1.0.5-py3-none-win32.whl | Python 3 | none | Windows x86-32 | Details |
| q_lang_server-1.0.5-py3-none-musllinux_1_2_x86_64.whl | Python 3 | none | Linux musl 1.2+ x86-64 | Details |
| q_lang_server-1.0.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | Python 3 | none | Linux glibc 2.17+ x86-64 | Details |
| q_lang_server-1.0.5-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
| q_lang_server-1.0.5-py3-none-macosx_10_12_x86_64.whl | Python 3 | none | macOS 10.12+ x86-64 | Details |
Total release size:11.8 MB
Release files / q_lang_server-1.0.5-py3-none-win_amd64.whl
| Download URL | q_lang_server-1.0.5-py3-none-win_amd64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
88c2cd0a4f915ebf4df0bac2a0eb7dd15063b27caefca2e4b3a2d192dc83ba12
|
|
BLAKE2b-256 checksum How to use checksums |
66850a0f7c8a1a88920f5c7ed2f453c71380b487d56d2d7448b819d2518359fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","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}
|
Release files / q_lang_server-1.0.5-py3-none-win32.whl
| Download URL | q_lang_server-1.0.5-py3-none-win32.whl |
|---|---|
| Size | 1.8 MB |
| Tags | Python 3 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
649f188658fc6690e0e28ec2306fa0e918035ab36860d718fead8be6b30c3cfb
|
|
BLAKE2b-256 checksum How to use checksums |
e09d0b7a369a5e415211b1e5d0933060365c097fc5e0a5dc2ee2e1f04601bb53
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","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}
|
Release files / q_lang_server-1.0.5-py3-none-musllinux_1_2_x86_64.whl
| Download URL | q_lang_server-1.0.5-py3-none-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 2.1 MB |
| Tags | Linux musl 1.2+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
d05706b838f6f241c752e964c7aca2f8258b00be876219a26070a603266e01ab
|
|
BLAKE2b-256 checksum How to use checksums |
4ecade01d8cd10bdba9040b138cbd5500c5795d893945a8fa660ac62f2a60fba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","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}
|
Release files / q_lang_server-1.0.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | q_lang_server-1.0.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | Linux glibc 2.17+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
e0f907726f57cb11ba41b1e3925a4dbacc5b9fdaf19bf7f65758d3edf1f08b05
|
|
BLAKE2b-256 checksum How to use checksums |
6c42aaea965760824379d38ba029a243939bf90648a51a30feb21efe967140b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","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}
|
Release files / q_lang_server-1.0.5-py3-none-macosx_11_0_arm64.whl
| Download URL | q_lang_server-1.0.5-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
380e00d5c4af543c56647cdce90e2911794ab61f6294041e21ed8ad478b8713b
|
|
BLAKE2b-256 checksum How to use checksums |
c1364d9ce523b0facab75fe0e197eaad4f836edae9b8a9991cf1c21f6f0dfa9d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","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}
|
Release files / q_lang_server-1.0.5-py3-none-macosx_10_12_x86_64.whl
| Download URL | q_lang_server-1.0.5-py3-none-macosx_10_12_x86_64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | Python 3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
3039f1e7f7f5da2266885f86bf4e727f3f8aded62639328495ffb9b07301f24b
|
|
BLAKE2b-256 checksum How to use checksums |
3c881c23d698a3e982b3c6c9d0a8d43d76a2ee2c31c9f57648273f714026cbdc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","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}
|