Viewing Complex Tables/Objects in VS Code

I have a complex table which I can represent nicely using PrettyTables. I would like to be able to view large versions of these tables (like the PrettyTables examples, but hundereds of columns).

I can’t use the VS-Code table viewer because of having merged column labels and row group labels. I was thinking about returning an HTML PrettyTable and trying to get the rendered HTML to be displayed in a VS Code tab or plot pane, but I can’t seem to figure that out programmatically (CLI for VS code doesn’t do the former, HTML MIME type doesn’t seem to trigger the plot pane).

Is there any way to get arbitrary HTML to display in VS Code, or some existing Julia package that provides this sort of functionality I can use while interactively working in VS Code?

How about exporting and saving a stand-alone HTML table from PrettyTables (with CSS injected), then preview it in VS Code?

For previewing, you generally use an extension:

  • Live Preview (Microsoft): in-editor preview via a local server.
  • Live Server: common alternative for serving and reloading HTML.
  • Pair either with Simple Browser if you want the preview inside VS Code.

Yeah, that’s essentially what I am trying to do, except I want the user to just be able to call a single Julia function and not need to invoke a second step manually.

You can create a custom show method for your type for MIME application/vnd.julia-vscode.custompane+html and it should automatically select the vscode pane for displaying.

See some docstring here