Add CUE language support via cue lsp#1474
Merged
Merged
Conversation
Adds a CueLanguageServer implementation driven by the LSP mode of the official `cue` CLI (`cue lsp`), introduced in recent cue releases. - Auto-downloads the `cue` binary from cue-lang/cue GitHub releases (SHA-256-verified) for linux-x64/arm64, darwin-x64/arm64, and win-x64/arm64; `ls_specific_settings.cue.ls_path` overrides with a pre-installed binary. - Handles the `workspace/configuration` request that cue lsp issues during startup (without a reply, cue blocks before servicing requests). - Registers `Language.CUE` (.cue extension), adds pytest marker `cue`, and wires the LS factory. - Adds a three-file test repo rooted at `cue.mod/` exercising cross-file definitions, references, and hierarchical document symbols; 8 basic tests assert exact line/char positions captured from cue lsp v0.16.1. - Updates README, programming-languages doc, and CHANGELOG. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add a comment next to the pinned SHA256 dicts showing how to regenerate them from `gh release view`'s `assets[].digest` field, mirroring the guidance that taplo / pascal carry. - Note in the class docstring that overriding `cue_version` to an unpinned version skips SHA256 verification (since only the bundled versions have known checksums), so it should be paired with `ls_path` for integrity — matches the convention used by ada. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…support # Conflicts: # CHANGELOG.md
MischaPanch
reviewed
May 14, 2026
Adds a CueLanguageServer implementation driven by the LSP mode of the official `cue` CLI (`cue lsp`), introduced in recent cue releases. - Auto-downloads the `cue` binary from cue-lang/cue GitHub releases (SHA-256-verified) for linux-x64/arm64, darwin-x64/arm64, and win-x64/arm64; `ls_specific_settings.cue.ls_path` overrides with a pre-installed binary. - Handles the `workspace/configuration` request that cue lsp issues during startup (without a reply, cue blocks before servicing requests). - Registers `Language.CUE` (.cue extension), adds pytest marker `cue`, and wires the LS factory. - Adds a three-file test repo rooted at `cue.mod/` exercising cross-file definitions, references, and hierarchical document symbols; 8 basic tests assert exact line/char positions captured from cue lsp v0.16.1. - Updates README, programming-languages doc, and CHANGELOG. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add a comment next to the pinned SHA256 dicts showing how to regenerate them from `gh release view`'s `assets[].digest` field, mirroring the guidance that taplo / pascal carry. - Note in the class docstring that overriding `cue_version` to an unpinned version skips SHA256 verification (since only the bundled versions have known checksums), so it should be paired with `ls_path` for integrity — matches the convention used by ada. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Drop the INITIAL_CUE_VERSION / INITIAL_CUE_SHA256_BY_PLATFORM pair and collapse _cue_sha to the single DEFAULT_* path. The INITIAL_* concept exists in other LSes purely for backwards compatibility with their pre-existing legacy unversioned install dir; CUE is brand new, so the unversioned-dir reservation has no users to preserve. Every install now goes into a versioned `cue-<version>` subdir. - Drop the docstring under Language.CUE in ls_config.py; other entries in the enum (e.g. PYTHON, RUST, GO) don't carry one either. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
b4e751f to
acf8dd7
Compare
…support Resolves README.md conflict in the supported-languages list by combining CUE (this branch) with GDScript and Svelte (origin/main).
Reconciles local merge of origin/main with the latest PR review feedback (commits d034ad8 and acf8dd7). Conflicts resolved: - src/solidlsp/ls_config.py: keep the PR-side decision to drop the Language.CUE docstring (commit acf8dd7). - src/solidlsp/language_servers/cue_language_server.py: take the PR-side version that collapses the INITIAL_CUE_VERSION/INITIAL_CUE_SHA256_BY_PLATFORM pair (commit acf8dd7). - CHANGELOG.md: drop the duplicate CUE entry that lived in v1.5.0 from the original feature branch (origin/main now has the canonical CUE entry earlier in the same section); preserve the new Memories/CLI/Tools sections from origin/main.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds support for the CUE configuration language via the LSP mode of the official
cueCLI (cue lsp, introduced in recent cue releases).Summary
CueLanguageServerusingLanguageServerDependencyProviderSinglePath. Thecuebinary is auto-downloaded from cue-lang/cue GitHub releases and SHA-256-verified for linux-x64/arm64, darwin-x64/arm64, and win-x64/arm64. Default pinned version:v0.16.1. Users can override the binary vials_specific_settings.cue.ls_path(pre-installedcue, e.g. from Homebrew orgo install) or pin a different release vials_specific_settings.cue.cue_version.cue lspissues aworkspace/configurationrequest to the client during startup and blocks until it gets a reply. The implementation registers a handler returning empty config objects per requested item.Language.CUE(.cueextension), factory case insrc/solidlsp/ls.py, pytest markercueinpyproject.tomlandtest/conftest.py.test/resources/repos/cue/test_repo/): a three-file CUE module rooted atcue.mod/that exercises:#Person,#Greeting,#BuildGreeting) inschema.cueandlib.cue.alice,greetingForAlice,locale) inmain.cue.cue vetand evaluates withcue export.test/solidlsp/cue/test_cue_basic.py): 8 tests covering LS startup, hierarchical document symbols, full symbol tree, cross-file definitions, and within/cross-file references. Line/char positions were captured from realcue lsp v0.16.1responses and asserted exactly.docs/01-about/020_programming-languages.md, andCHANGELOG.md.Verification
poe lintandpoe type-checkclean.Notes
Happy to adjust naming, version-pinning convention, initialization options, or anything else.