sqlakit-lsp
The language server for SQLAKit
templates. In a .sql template:
- the problems
sqlakit checkfinds, as you type - completion after
tpl.and intpl.include(', and a macro's arguments while you write them - on hover, the SQL a call writes, above the macro's signature and docstring
- go to definition, implementation and references of a macro or a template
- rename of a macro or a template across the project
- the macros' calls and the parameters coloured
- a parameter no call of the project passes, marked, with a quick fix for a name close to one the calls pass
- Show rendered SQL, the whole template as the SQL it writes
- the outline of a template, and a search for a macro or a template
In Python, the template name in db.sql("...") completes and links to its
file, and a value the template does not read is marked.
$ pip install sqlakit-lsp
Register sqlakit-lsp for .sql and .py files in your editor. It talks over
stdio. In Neovim 0.11:
vim.lsp.config("sqlakit", {
cmd = { "sqlakit-lsp" },
filetypes = { "sql", "python" },
root_markers = { "pyproject.toml" },
})
vim.lsp.enable("sqlakit")
Zed colours the macros' calls and the parameters of a template from the
server once its settings say "semantic_tokens": "combined".
It reads the project the way sqlakit check does, from the Templates(...)
the code builds, without running it. SQL
templates
covers what it reads, and [tool.sqlakit.templates] for a project whose code
builds its paths in a way it can't follow.
Development
$ uv sync
$ uv run poe test
$ uv run poe lint
Release files for sqlakit-lsp 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sqlakit_lsp-0.1.2.tar.gz | 27.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sqlakit_lsp-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 56.0 kB
Release files / sqlakit_lsp-0.1.2.tar.gz
| Download URL | sqlakit_lsp-0.1.2.tar.gz |
|---|---|
| Size | 27.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4c1467c701a7a26dbd5b4b49297f7ab24e410ca90e69bcbc702c08ec6a380e72
|
|
BLAKE2b-256 checksum How to use checksums |
d31ad9e2841bd74e81f8f5521cf6a510ea8af4268b191cac8fb3b5c0a1c060c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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 / sqlakit_lsp-0.1.2-py3-none-any.whl
| Download URL | sqlakit_lsp-0.1.2-py3-none-any.whl |
|---|---|
| Size | 28.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1f26d89a940e42c7a62885cb73733f86a1a5b8e4488961b0b149ab0ed7472f51
|
|
BLAKE2b-256 checksum How to use checksums |
a7ca2b170c4ce7718dedf9668b376b57c2624c655f8349cf9fa3a4872eb226fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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}
|