Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Use MarkupContent for hover contents

Closed
#548 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
65/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
rust

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

enhancement language-server lsp-3.18

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 fenced purescript blocks 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 MarkedString helpers and the #[allow(deprecated)] attributes from hover.rs and the integration-test renderer.
  • Regenerate the affected lsp fixture snapshots and review each hover change.

Tests

  • just t lsp with 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from purefunctor/purescript-iris

All issues in purefunctor/purescript-iris

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.