facebook / facebook/pyrefly

Feature/RFC show structural definition when hovering over a typed dict

Open
#3,608 0 comments 1 reaction 0 assignees View on GitHub
language-server needs-discussion
Dominant language
Rust
Stars
7k
Forks
519
PR merge metrics
No merged PRs in 30d

Description

### Describe the Bug

When hovering over a typed dict, instead of showing just the class name, maybe we should show something like

`{"x": int, "y": str, ...}` (no ... if the TD is closed)

Open questions:
Is this a good idea? One con I can think of is that the hover is no longer a valid type form.
Could we do the same with namedtuple? (maybe not since it's hard to express both names & positions)

### Sandbox Link

_No response_

### (Only applicable for extension issues) IDE Information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.