Use MarkupContent for hover contents
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 65/100
Research direction
The work is in compiler-services/iris-analysis/src/hover.rs and tests-integration/src/generated/lsp.rs. Start by reading the LSP 3.18 spec on MarkupContent and the gen-lsp-types crate. Examine how hovers are currently built using MarkedString. Change the logic to build a single MarkupContent value, handling the contentFormat client capability. Update the integration test renderer and regenerate snapshots with just t lsp. Done when the #[allow(deprecated)] attributes are removed and all hover tests pass.
Written by the indexing model from the issue text.
Description
Context
The language server is moving from lsp-types 0.95 to gen-lsp-types, which generates its types from the LSP 3.18 metamodel. LSP 3.18 deprecates MarkedString in favour of MarkupContent, and gen-lsp-types marks MarkedString, MarkedStringWithLanguage, and their variants #[deprecated].
Hovers still build MarkedString values (Contents::MarkedString and Contents::MarkedStringList) in compiler-services/iris-analysis/src/hover.rs: signatures and kinds as purescript code blocks, annotations as plain strings, and --- separators between them. To keep the type migration free of wire and snapshot changes, those sites and the hover renderer in tests-integration/src/generated/lsp.rs are allowed with a scoped #[allow(deprecated)].
Goal
Return hover contents as MarkupContent and remove the #[allow(deprecated)] escape hatches.
Scope
- Build hover contents as a single
MarkupContent, rendering code as fencedpurescriptblocks and separating sections with Markdown rules. - Negotiate
textDocument.hover.contentFormat: use Markdown when the client supports it and fall back to plain text otherwise, rather than assuming Markdown. - Remove the
MarkedStringhelpers and the#[allow(deprecated)]attributes fromhover.rsand the integration-test renderer. - Regenerate the affected
lspfixture snapshots and review each hover change.
Tests
just t lspwith reviewed snapshot changes for hover fixtures.- A capability-negotiation test covering Markdown and plain-text clients.
- Dominant language
- Rust
- Stars
- 102
- Forks
- 11
- Avg merge
- 4h 28m
- Merged PRs (30d)
- 128
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from purefunctor/purescript-iris
-
bug language-server
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
purefunctor/purescript-iris#552 ·
Maintainers usually reply within 1 day
-
bug language-server
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
purefunctor/purescript-iris#551 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
purefunctor/purescript-iris#601 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
purefunctor/purescript-iris#599 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
purefunctor/purescript-iris#560 ·
Maintainers usually reply within 1 day
All issues in purefunctor/purescript-iris
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
bytecodealliance/wasmtime#14433 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day