Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[ty] respect client's content format preference#25957

Merged
MichaReiser merged 7 commits into
astral-sh:mainfrom
ankddev:respect-content-format-order
Jun 15, 2026
Merged

[ty] respect client's content format preference#25957
MichaReiser merged 7 commits into
astral-sh:mainfrom
ankddev:respect-content-format-order

Conversation

@ankddev

@ankddev ankddev commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Test Plan

  • Wrote several e2e tests for both hover and completions
  • Run the entire test suite with nextest

@astral-sh-bot astral-sh-bot Bot added server Related to the LSP server ty Multi-file analysis & type inference labels Jun 13, 2026
@astral-sh-bot astral-sh-bot Bot requested a review from charliermarsh June 13, 2026 15:35
@ankddev ankddev force-pushed the respect-content-format-order branch from 1abf611 to 67ae255 Compare June 13, 2026 15:37

@MichaReiser MichaReiser left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. I only have two small nits

Comment thread crates/ty_server/src/capabilities.rs Outdated
Comment thread crates/ty_server/tests/e2e/hover.rs
@ankddev ankddev force-pushed the respect-content-format-order branch 5 times, most recently from f8e1ad5 to ffa5e22 Compare June 14, 2026 14:32
@ankddev ankddev force-pushed the respect-content-format-order branch from ffa5e22 to 7d2dcee Compare June 15, 2026 12:22
@ankddev ankddev force-pushed the respect-content-format-order branch from 7d2dcee to 96f52f2 Compare June 15, 2026 12:50
@ankddev ankddev requested a review from MichaReiser June 15, 2026 12:51
}

#[test]
fn documentation_prefers_markdown_when_listed_first() -> Result<()> {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created a test helper instead of iterating over different cases. It has the advantage that nextest can run the tests in parallel, and it's clearer which case failed if the tests stop passing

@MichaReiser MichaReiser force-pushed the respect-content-format-order branch from ff28392 to 3150981 Compare June 15, 2026 13:36
@MichaReiser MichaReiser merged commit 94220d1 into astral-sh:main Jun 15, 2026
51 checks passed
@MichaReiser

Copy link
Copy Markdown
Member

Thank you

@ankddev ankddev deleted the respect-content-format-order branch June 15, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

server Related to the LSP server ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hover ignores client's contentFormat preference

3 participants