tinymist
tinymist copied to clipboard
Display all imported definitions for wildcard imports
Motivation
While wildcard imports like #import "package.typ": *
can be convenient for importing package interfaces once and for all, it becomes difficult to trace which specific functions or variables are imported, as they are not explicitly listed.
Description I propose adding a feature that, when we hover over the wildcard symbol (*) in an import statement, a tooltip shows all the function and variables that are being imported by that statement.
Introducing this feature would greatly benefit us by providing a clearer understanding of code dependencies, ensuring better management of namespace, and avoiding unintentional name shadowing.
Examples/Questions
- Code snippet:
#import "package.typ": *
- Hover over the wildcard symbol (*)
- Show all the definitions introduced by
package.typ
, namely all definitions listed in theentrypoint
typst file, which is specified bytypst.toml
IIRC.