LSP Setup
Editor integration for SQLCtx SQL via the Language Server Protocol.
SQLCtx includes an LSP server for its SQL dialect (MODEL/DIMENSION/METRIC/RELATIONSHIP/SEGMENT).
Install the required extra with uv tool install "sqlctx[lsp]", or use the uvx --from command below.
Start the Server
sqlctx lsp
uvx --from "sqlctx[lsp]" sqlctx lsp --help
Usage: sqlctx lsp
The LSP server runs on stdio. Configure your editor to start the command for files you want to edit.
Troubleshooting
- If completion doesn’t work, confirm the editor is actually launching
sqlctx lsp. - If diagnostics are missing, run
sqlctx validateand compare errors.