mylesmmurphy / prettify-ts

Prettify TypeScript: Better Type Previews
https://marketplace.visualstudio.com/items?itemName=MylesMurphy.prettify-ts
MIT License
181 stars 6 forks source link

Hide original typescript types #13

Open itsyoboieltr opened 5 months ago

itsyoboieltr commented 5 months ago

Is it possible to hide the original types if I only want to see the prettified types provided by the extension? :D It is confusing for me to have the same type twice.

mylesmmurphy commented 5 months ago

Hey @itsyoboieltr! Thanks for mentioning this. Unfortunately, the extension doesn't have any control over the default TypeScript hover "quick info," however, the extension tries it's best to not display redundant information. Is it showing the exact same type preview twice? If so, would you mind sharing an example?

itsyoboieltr commented 5 months ago

Hey @itsyoboieltr! Thanks for mentioning this. Unfortunately, the extension doesn't have any control over the default TypeScript hover "quick info," however, the extension tries it's best to not display redundant information. Is it showing the exact same type preview twice? If so, would you mind sharing an example?

It is not the exact same type preview, just very similar. I agree that there is nothing the extension can do, the question is more about if it is possible to turn off the default type hover somehow? Because it would be nice to only see the prettified one the extension provides.

mylesmmurphy commented 4 months ago

Hey @itsyoboieltr, wanted to update you on this. I've looked through all of the VSCode options for modifying the default hover quick info provided by TypeScript, but unfortunately VSCode and TS don't give us that level of granularity, you'd need to either turn off hover information completely or not 😢 I'll keep this open for now to see if anyone else might know how

mylesmmurphy commented 1 month ago

Hi @itsyoboieltr I wanted to follow up with you. The project is currently being re-engineered to utilize a ts server plugin, which will also allow me to easily add the functionality you're asking for here. This is on the roadmap, and I plan to introduce it after the reworked project is fully tested and released.

https://github.com/mylesmmurphy/prettify-ts/releases/tag/v0.1.0-alpha