tinymist icon indicating copy to clipboard operation
tinymist copied to clipboard

Display all imported definitions for wildcard imports

Open hooyuser opened this issue 7 months ago • 0 comments

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 the entrypoint typst file, which is specified by typst.toml IIRC.

hooyuser avatar Jul 12 '24 05:07 hooyuser