Skip to main content

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.

  1. Install qls (see above) and ensure it is on your $PATH.
  2. 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

License

Licensed under the Apache License, Version 2.0.

Release files for q-lang-server 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for q-lang-server 1.0.4
File
q_lang_server-1.0.4-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
q_lang_server-1.0.4-py3-none-win32.whl Python 3 none Windows x86-32 Details
q_lang_server-1.0.4-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details
q_lang_server-1.0.4-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.4-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
q_lang_server-1.0.4-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.4-py3-none-win_amd64.whl

Download URL q_lang_server-1.0.4-py3-none-win_amd64.whl
Size 2.0 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
9c5c6d667cabe647556404ea579e851b08813f095982b0b33d79b01bb2680888
BLAKE2b-256 checksum
How to use checksums
fa8d311bb1cb459349b01c5f0f8f99d9e7bf5517da9d876ba3e184e778afdb6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","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.4-py3-none-win32.whl

Download URL q_lang_server-1.0.4-py3-none-win32.whl
Size 1.8 MB
Tags Python 3 Windows x86-32
SHA-256 checksum
How to use checksums
591a575bc5ef16e3d04fe9320b9f25956c9110ac16801927746d7d17ceecae51
BLAKE2b-256 checksum
How to use checksums
49b22fe67c89a0e68eba50baa0138e5609a05f03f38d1d8de6e2549050ed83c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","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.4-py3-none-musllinux_1_2_x86_64.whl

Download URL q_lang_server-1.0.4-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
81e52692acaedaddb927aa7fae7fe4c9ebd0e8bb0737001ad739259fae1cfc7d
BLAKE2b-256 checksum
How to use checksums
8d62fcba6454365621380e7a9ac981f31d9239a4384cd7a6bc7e1450f3eadea4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","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.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL q_lang_server-1.0.4-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
8116d0a4ce5ef1594050c127c3a85665ae612c4726c7a111becf82a2d5dd36d2
BLAKE2b-256 checksum
How to use checksums
33bd51f5b786b55c306a673af9928fcee2d1762802ca4ceee6f65577fa11bcc8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","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.4-py3-none-macosx_11_0_arm64.whl

Download URL q_lang_server-1.0.4-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
3d426ae7917832a849d00a3e22d8c09a40b76b5bec50c2b5b0883ee8e71a2574
BLAKE2b-256 checksum
How to use checksums
bb919e65f6a5b1988daa5ac7c82eeebb2b0982a9d27e325577e6c4dfff309df2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","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.4-py3-none-macosx_10_12_x86_64.whl

Download URL q_lang_server-1.0.4-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
17f3e480e34db06838021702c680574465f95e0ddeb66c20402a78a27a061b95
BLAKE2b-256 checksum
How to use checksums
beb4a1d44bd619b639a775b2a583871e1559e6b015a038e9a55e7bc0e242f4cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","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 history Release notifications | RSS feed

1.0.5

6 release files

This release

1.0.4 This release

6 release files

1.0.2

6 release files

1.0.1

6 release files

1.0.0

6 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page