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

Formatting snippets on hover #243

Open
titoBouzout opened this issue Feb 17, 2024 · 5 comments
Open

Formatting snippets on hover #243

titoBouzout opened this issue Feb 17, 2024 · 5 comments

Comments

@titoBouzout
Copy link

I'm not really sure how this could work, but would be great if the code snippets shown on hover could have a bit better formatting. Some typescript messages are very hard to parse, well even with formatting xD, but formatted would make the code snippets digestible. Thanks

@titoBouzout
Copy link
Author

wrong repo, I mean to post in LSP

@rchl
Copy link
Member

rchl commented Feb 17, 2024

More correct than LSP.

@rchl rchl reopened this Feb 17, 2024
@rchl
Copy link
Member

rchl commented Feb 17, 2024

There is a project that could be integrated with the server - https://github.com/yoavbls/pretty-ts-errors

Though it is currently not quite compatible with LSP as it formats messages to HTML rather than markdown (which LSP expects). Someone made some effort to create version that produces markdown output but it's not that good for now.

@rchl
Copy link
Member

rchl commented Feb 17, 2024

And note that that project is about formatting typescript error messages and nothing else (you mention code snippets but I guess you meant error messages).

@titoBouzout
Copy link
Author

There is a project that could be integrated with the server - https://github.com/yoavbls/pretty-ts-errors

Though it is currently not quite compatible with LSP as it formats messages to HTML rather than markdown (which LSP expects). Someone made some effort to create version that produces markdown output but it's not that good for now.

Yes, something like that project would be perfect. Wish ST supported JavaScript extensions..

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

2 participants