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
427 stars 17 forks source link

Allow us to configure the max length of the type hint #38

Open jack-bliss opened 8 months ago

jack-bliss commented 8 months ago

https://github.com/orta/vscode-twoslash-queries/blob/d461407faff408be22a776c0c21ffc52799d0a33/src/helpers.ts#L41

image
orta commented 8 months ago

I'm open to having it be dynamic (e.g. as long as the current editor) as an optimal answer ( I likely C&P'd the 120 from the TS website codebase) before looking at adding an option

jack-bliss commented 8 months ago

that would probably be ideal tbh! i don't think theres a whole lot of value in truncating it atm, since its always on its own line, and you can only have one per line.

t6adev commented 8 months ago

Happy if it would be not cut off somehow. For now, could we have a configuration to set the length by config?

BalaM314 commented 5 months ago

Affected by microsoft/vscode#205708

ssalbdivad commented 2 months ago

Would be a huge help if this were configurable! Even just increasing the default feels like it would be a big help. 120 feels really limiting, especially if you want to use the newer //=>? for same-line inference or just need a longer type name so that you can line up //^? correctly after formatting.

I'd expect that the downside for users whose types get cut off is relatively minor since it would have been truncated either way, but the upside for users with more space is huge 🙏

image

tylersayshi commented 2 months ago

I'm hoping this helps :)

https://github.com/orta/vscode-twoslash-queries/pull/39