Closed vaughnkoch closed 3 years ago
@vaughnkoch data preview is designed to work only with local data files saved on disk, and doesn't extract data from your active editor or untitled docs.
It's an interesting request and I can see how previewing chunks of selected json can be useful. Implementing it might require some major refactoring and implementing new editor selection data provider that also detects what kind of data document you have open, not to mention validating that your selection is a valid json, csv, etc.
A lot of things in data preview are tied to data file name and type for data loading, saving, caching data search/filters config, etc. for data preview restore on vscode reopen. So, this might be a larger effort than I see myself investing time into, and I am going to close this as out of scope for now.
As a workaround you can save your Untitled doc or extract selected data chunks into a separate file and use this extension as is.
Most of the time, viewing temp data is exactly what I'd be using this extension for. Its unfortunate you don't plan to support it.
@kczx3 sorry, I try to produce and maintain quite a few data viz tools for vscode, but I am just one guy and my bandwidth is limited. I might add it in a paid Pro version when I find the time to do that.
Thanks for your feedback and support!
Great extension! Feature request: work with unsaved files.
If I copy json and paste it into a new Untitled doc in VSCode, and don't save it, then open Data: Preview Data On Save, I get the following debug info from DP:
It would be awesome if it could recognize that the current tab isn't a saved file and just use the data in the window. Even better, if you highlight a subset of data, it could use that.