Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide original typescript types #13

Open
itsyoboieltr opened this issue Jan 14, 2024 · 5 comments
Open

Hide original typescript types #13

itsyoboieltr opened this issue Jan 14, 2024 · 5 comments

Comments

@itsyoboieltr
Copy link

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
Copy link
Owner

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
Copy link
Author

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
Copy link
Owner

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
Copy link
Owner

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

@rcoopr
Copy link

rcoopr commented Jul 6, 2024

As an extension of this, is it possible to re-order the built-in vs generated type information?

For example, hovering over a const with type HTMLElement, you get an object with ~300 keys to scroll through before finding its an HTMLInputElement instead. It might be nice to have this as an option, or based on the lengths of each output and have the shortest first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants