Skip to content

Apply formatting to hover information #264

@InSyncWithFoo

Description

@InSyncWithFoo

Here's what ty has to say about the type of pydantic.Field:

For reference, here's Pyright's:

There are two problems here:

  • There is no syntax highlighting.

    The code block's language is text, but it should be python. I understand ty's type information is not always valid Python, but for all intents and purposes it might as well be considered as such. I'd also like to add that ty should put more trust in syntax highlighters, which are often written with invalid code in mind.

  • The formatting is unreadable.

    I feel like it should be possible to run Ruff's formatter on ty's output, especially syntactically valid ones like Literal["some", "very", "long", "names"].

Metadata

Metadata

Assignees

Labels

serverRelated to the LSP server

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions