You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if there's any use-case for users. It would probably be mostly a thing for libraries and for testing those without having to compile.
My use-case here is displaying traced calls in the tooltips as if you had eval'd all the calls inline. So if you do (run-traced (some-func 5)) I can show you the result in the some-func tooltip and do the same for anything it might have called.
Another library that would benefit from this is spec/malli where you can show the spec for a function in the tooltip of the function.
I've already started building this and have played with two approaches:
hover provider
This is the most flexible and easiest to build. We can simply call all customeHoverSnippets with the file, line, column and they can provide some markdown to be shown. This way any snippet could even implement links that do something, like the clojureDocs tooltips.
vscode.Texteditor.decorations
This is the place the inline eval values are put. Using it has a lot of disadvantages:
hard to implement since it's a push, not pull model and snippets are pull
harder to clear independently
not as extensible
This kind of depends on #1442 to be really useful, so I'll base the PR on the PR for that and add it as customTooltipSnippets option if this doesn't make merging harder @PEZ
As always I'd be happy to hear any feedback.
The text was updated successfully, but these errors were encountered:
I'm not sure if there's any use-case for users. It would probably be mostly a thing for libraries and for testing those without having to compile.
My use-case here is displaying traced calls in the tooltips as if you had eval'd all the calls inline. So if you do (run-traced (some-func 5)) I can show you the result in the some-func tooltip and do the same for anything it might have called.
Another library that would benefit from this is spec/malli where you can show the spec for a function in the tooltip of the function.
I've already started building this and have played with two approaches:
hover provider
This is the most flexible and easiest to build. We can simply call all customeHoverSnippets with the file, line, column and they can provide some markdown to be shown. This way any snippet could even implement links that do something, like the clojureDocs tooltips.
vscode.Texteditor.decorations
This is the place the inline eval values are put. Using it has a lot of disadvantages:
This kind of depends on #1442 to be really useful, so I'll base the PR on the PR for that and add it as
customTooltipSnippets
option if this doesn't make merging harder @PEZAs always I'd be happy to hear any feedback.
The text was updated successfully, but these errors were encountered: