Commit 448734e
Add Rust-based LQL Language Server and VSCode extension overhaul (#26)
## TLDR
- New Rust LSP server for LQL with ANTLR-generated parser, completions,
hover, diagnostics, schema awareness, and AI integration
- VSCode extension rewritten to use the Rust LSP as backend, with
comprehensive test suites
- Repo standardisation: Makefile, CI/CD, devcontainer, LQL website
(Eleventy), csproj/editorconfig cleanups
## What Was Added?
- **`Lql/lql-lsp-rust/`** — Full Rust LSP implementation in a Cargo
workspace:
- `lql-parser`: ANTLR-generated Rust parser with span tracking, token
mapping, and error recovery
- `lql-analyzer`: Completions, hover, diagnostics, symbol resolution,
scope analysis, schema-aware intelligence
- `lql-lsp`: LSP server (`tower-lsp`), database schema introspection,
AI-powered features (explain query, suggest optimisations)
- **`Lql/LqlExtension/src/test/`** — Three test suites: LSP protocol
(3584 lines), VSCode E2E (526 lines), VSIX packaging (153 lines), plus
LQL fixture files
- **`Lql/LqlWebsite-Eleventy/`** — Full documentation site with docs for
syntax, pipelines, lambdas, joins, aggregation, SQL dialects, VSCode,
and AI integration
- **`Makefile`** — Centralised build/test/lint/fmt/coverage commands
across C#, Rust, and TypeScript
- **`.devcontainer/`** — Dev container config for codespace development
- **Claude skills** — `ci-prep`, `fmt`, `lint` skills; removed old
`format` skill
## What Was Changed or Deleted?
- **`Lql/LqlExtension/`** — Extension rewritten: now launches the Rust
LSP binary, removed bundled `out/` build artifacts from repo
- **`.github/workflows/ci.yml`** — Expanded CI to build/test Rust
crates, run TypeScript tests, build VSIX
- **`.github/workflows/release.yml`** — Updated for Rust binary
cross-compilation and VSIX publishing
- **`.editorconfig`** — Major expansion for multi-language consistency
- **`Lql/Lql/Parsing/Lql.g4`** — Grammar updates (arithmetic functions,
syntax refinements)
- **csproj files** — Removed explicit `<Nullable>` / `<ImplicitUsings>`
(centralised in `Directory.Build.props`)
- **`Sync/`** — Minor fixes in `MappingConfigParser`, `MappingEngine`,
`SyncSchemaDefinition`
- **Website** — Added sitemap, about page, samples docs, layout
improvements
## How Do The Automated Tests Prove It Works?
**Rust unit tests** (`Lql/lql-lsp-rust/crates/lql-analyzer/src/tests.rs`
— 1258 lines):
- `test_completion_*`: Verifies completions for keywords, table names,
columns, functions, aliases in various contexts (SELECT, WHERE, JOIN,
GROUP BY, HAVING, window functions)
- `test_hover_*`: Validates hover info for tables, columns, functions,
keywords, aliases, aggregate/window functions
- `test_diagnostics_*`: Checks error detection for syntax errors,
unknown tables/columns, type mismatches, ambiguous columns
- `test_scope_*`: Tests scope resolution across subqueries, CTEs, let
bindings, pipeline stages
- `test_schema_*`: Tests schema loading, introspection, and table/column
resolution
**Rust integration tests**
(`Lql/lql-lsp-rust/crates/lql-lsp/tests/lsp_protocol.rs` — 879 lines):
- Full LSP lifecycle: initialize → open document → request
completions/hover/diagnostics → shutdown
- Tests actual JSON-RPC message serialization and protocol compliance
**TypeScript LSP protocol tests**
(`Lql/LqlExtension/src/test/suite/lsp-protocol.test.ts` — 3584 lines):
- Tests LSP message construction, response parsing, capability
negotiation, error handling
- Validates completion item kinds, hover content format, diagnostic
severity mapping
**TypeScript E2E tests**
(`Lql/LqlExtension/src/test/suite/vscode-e2e.test.ts` — 526 lines):
- Extension activation, document opening, language ID registration,
command registration
- Tests against LQL fixture files (simple select, filter lambda, case
expression, window functions, subqueries, complex pipelines)
**VSIX packaging tests**
(`Lql/LqlExtension/src/test/suite/vsix-packaging.test.ts` — 153 lines):
- Validates package.json structure, language contribution points,
activation events, grammar scopes
## Spec / Doc Changes
- `CLAUDE.md` updated with LQL platform-independence rule, CSS rules,
web/SEO rules
- `Lql/LqlWebsite-Eleventy/` — Full documentation site added
- `Lql/LqlExtension/README.md` — Rewritten for Rust LSP architecture
## Breaking Changes
- [ ] None
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent a126320 commit 448734e
File tree
201 files changed
+32568
-2594
lines changed- .claude/skills
- build
- ci-prep
- code-dedup
- format
- spec-check
- submit-pr
- upgrade-packages
- .clinerules
- .config
- .devcontainer
- .github
- workflows
- .vscode
- DataProvider
- DataProvider.Example.FSharp
- DataProvider.Example.Tests
- DataProvider.Example
- DataProvider.Postgres.Cli
- DataProvider.SQLite.Cli
- DataProvider.SQLite
- DataProvider.SqlServer
- SqlParsing
- DataProvider.Tests
- DataProvider
- Gatekeeper
- Gatekeeper.Api.Tests
- Gatekeeper.Api
- Lql
- Lql.Browser
- Lql.Postgres
- Lql.SQLite
- Lql.SqlServer
- Lql.Tests
- TestData
- ExpectedSql
- PostgreSql
- SQLite
- SqlServer
- Lql
- Lql.TypeProvider.FSharp.Tests.Data
- LqlCli.SQLite.Tests
- LqlCli.SQLite
- LqlExtension
- out
- src
- test
- fixtures
- suite
- LqlWebsite-Eleventy
- src
- _data
- _includes/layouts
- assets
- css
- images
- js
- docs
- LqlWebsite
- Lql
- Parsing
- lql-lsp-rust
- crates
- lql-analyzer
- src
- lql-lsp
- src
- tests
- lql-parser
- src
- generated
- Migration
- Migration.Cli
- Migration.Postgres
- Migration.SQLite
- Migration.Tests
- Migration
- Schema.Export.Cli
- Other/Selecta
- Samples
- Clinical
- Clinical.Api.Tests
- Clinical.Api
- Clinical.Sync
- Dashboard
- Dashboard.Integration.Tests
- Dashboard.Web
- ICD10
- ICD10.Api.Tests
- ICD10.Api
- ICD10.Cli.Tests
- ICD10.Cli
- scripts/CreateDb
- Scheduling
- Scheduling.Api.Tests
- Scheduling.Api
- Scheduling.Sync
- Sync
- Sync.Http.Tests
- Sync.Http
- Sync.Integration.Tests
- Sync.Postgres.Tests
- Sync.Postgres
- Sync.SQLite.Tests
- Sync.SQLite
- Sync.Tests
- Sync
- Website/src
- _data
- _includes/layouts
- assets/css
- blog
- docs
- docs/plans
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
201 files changed
+32568
-2594
lines changedThis file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
0 commit comments