feat: switch to gen-lsp-types#68
Open
ribru17 wants to merge 1 commit intoThePrimeagen:masterfrom
Open
Conversation
[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.
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.
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:
SnippetTextEditsupport (proposed) gluon-lang/lsp-types#310Uritype in 0.96.0 is hard to use and have almost no interoperability gluon-lang/lsp-types#284DefaultforCodeActionOptionsgluon-lang/lsp-types#260See 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-typesdependency togen-lsp-typesand updates bothlspandutilcrates to consume it via workspace dependencies.Adjusts LSP handling code to the new generated type shapes (renamed enum variants,
text_document_position_paramsfield,Url→Uri, hovercontentstype, and capability construction), and updatesCargo.lockwith 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.