Fix incorrect lsp inlay hint type by MatthewMckee4 · Pull Request #20044 · astral-sh/ruff (original) (raw)
Conversation
Summary
Previously we just communicated that the inlay hint type was "TYPE", so now we give the correct type
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
| impl RetriableRequestHandler for InlayHintRequestHandler {} |
| fn inlay_hint_type(inlay_hint_content: &InlayHintContent) -> lsp_types::InlayHintKind { |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Would you mind to also wire it up in wasm and the playground?
| #[wasm_bindgen] |
|---|
| #[derive(Debug, Clone, PartialEq, Eq)] |
| pub struct InlayHint { |
| #[wasm_bindgen(getter_with_clone)] |
| pub markdown: String, |
| pub position: Position, |
| } |
and here
| hints: inlayHints.map((hint) => ({ |
|---|
| label: hint.markdown, |
| position: { |
| lineNumber: hint.position.line, |
| column: hint.position.column, |
| }, |
| })), |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah
mypy_primer results
No ecosystem changes detected ✅
No memory usage changes detected ✅
Not really sure how the ide handles these kinds differently
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
second-ed pushed a commit to second-ed/ruff that referenced this pull request
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
[ Show hidden characters]({{ revealButtonHref }})
Labels
Related to the LSP server
Multi-file analysis & type inference