orta / vscode-twoslash-queries

VS Code extension which adds support for twoslash queries into typescript projects
https://marketplace.visualstudio.com/items?itemName=Orta.vscode-twoslash-queries
MIT License
403 stars 12 forks source link

Support for proportional typefaces #12

Open nickmccurdy opened 1 year ago

nickmccurdy commented 1 year ago

I exclusively use proportional typefaces when coding. I like the idea of this extension, but I wouldn't be able to use it easily because the ^ may not be aligned with the type on my typeface. Perhaps there could be an alternate syntax that doesn't rely on a monospace typeface.

orta commented 1 year ago

I'm somewhat open to it, but I'm wary the further this extension strays from the twoslash syntax in the TS site / compiler codebase the harder it is to just "get"

Perpahts there could be an identifier lookup in some new syntax similar to how we do types?

abc.de
// ^?["de"]

Where the ^? implies the line, and then ["de"] means look through that line until you find a matching identifier and show that

nickmccurdy commented 1 year ago

We could also use ESLint style // next or /* enable */ comments.

orta commented 1 year ago

No, not in this extension - the key is sticking with the twoslash format and they'll never support those ( but it'd be trivial to fork this extension and add it though, it's only ~200 LOC)