Skip to content

feat: switch to gen-lsp-types#68

Open
ribru17 wants to merge 1 commit intoThePrimeagen:masterfrom
ribru17:gen-lsp-types
Open

feat: switch to gen-lsp-types#68
ribru17 wants to merge 1 commit intoThePrimeagen:masterfrom
ribru17:gen-lsp-types

Conversation

@ribru17
Copy link
Copy Markdown

@ribru17 ribru17 commented Apr 25, 2026

gen-lsp-types is an alternative to the lsp-types crate, with types generated via codegen from the official LSP Metamodel for correctness and completeness.

lsp-types issues fixed in gen-lsp-types:

See rust-lang/rust-analyzer#22115 and wgsl-analyzer/wgsl-analyzer#1090 for other migration considerations


Note

Medium Risk
Swaps the core LSP type definitions used across the server, which can subtly change JSON serialization/deserialization and capability wiring. Main risk is client-facing protocol incompatibilities if any renamed fields/enum variants don’t match expectations.

Overview
Switches the workspace’s lsp-types dependency to gen-lsp-types and updates both lsp and util crates to consume it via workspace dependencies.

Adjusts LSP handling code to the new generated type shapes (renamed enum variants, text_document_position_params field, UrlUri, hover contents type, and capability construction), and updates Cargo.lock with the new crate and transitive dependency/version changes.

Reviewed by Cursor Bugbot for commit 729d666. Bugbot is set up for automated code reviews on this repo. Configure here.

[gen-lsp-types](https://github.com/ribru17/gen-lsp-types) is an
alternative to the lsp-types crate, with types generated via codegen
from the official LSP Metamodel for correctness and completeness.

lsp-types issues fixed in gen-lsp-types:

- gluon-lang/lsp-types#310
- gluon-lang/lsp-types#308
- gluon-lang/lsp-types#284
- gluon-lang/lsp-types#278
- gluon-lang/lsp-types#277
- gluon-lang/lsp-types#260
- gluon-lang/lsp-types#245
- gluon-lang/lsp-types#93

See rust-lang/rust-analyzer#22115 and
wgsl-analyzer/wgsl-analyzer#1090 for other
migration considerations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant