Open Kyle-Ye opened 1 year ago
You can use the command Markdown: Open preview to the side
to give a markdown preview. This won't give you the full docc preview obviously but it is a start.
You can use the command
Markdown: Open preview to the side
to give a markdown preview. This won't give you the full docc preview obviously but it is a start.
Yeah. VSCode has a build-in Markdown preview panel.
But I'd like to know if it was possible to render a HTML directly in a associated-panel(The same as Markdown file and Markdown-Preview panel) via the VSCode plugin SDK.
You can do it. But managing the preview server, associating the current page with the correct page on the server isn't simple. It is all possible, just complex.
I have looked into to it a bit and got it displaying a page served by preview server I was running separately. But it is far away from a finished feature.
Any updates on this issue?
No update on this. I haven't had anymore time to look into it.
@adam-fowler Can we grab this one? If so, do you have your prototype changes in a fork somewhere?
@daveyc123 its all yours. I had some basic code setup to display the documentation but there was a loads of issues managing the preview server and updating the documentation. Don't think I kept any of the code around though.
@daveyc123 I found this https://github.com/adam-fowler/vscode-swift/tree/documentation-preview
Thanks for digging that up @adam-fowler
I just posted a general overview of how this feature could be implemented on the Swift forums: https://forums.swift.org/t/rfc-swift-docc-integration/75537
Please check it out and leave any feedback/suggestions that you might have!
Is your feature request related to a problem? Please describe.
When user actives documentation preview panel and is currently on a .swift, .h or .markdown file, preview the documentation on the right panel.
Describe the solution you'd like
It can be achieved by using the existing ConvertService API provided by DocC.
No Xcode magic is required.
Benefits
Improve the doc-writing experience on non-Xcode IDE.
Additional context
Inspiration: Xcode 15's documentation preview feature
See more info https://developer.apple.com/videos/play/wwdc2023/10244/