Skip to content

silx-kit/vscode-h5web

Repository files navigation

H5Web for Visual Studio Code

Explore and visualise HDF5 files directly in Visual Studio Code with H5Web and its H5WasmProvider.

GIF recording

Supported HDF5 file extensions

Out of the box, the H5Web viewer is configured as the default editor for the following file extensions: .h5, .hdf, .hdf5, .nx (NeXus), .nxs, .nx5, .nexus, .cxi (Coherent X-ray Imaging), .nc (netCDF4), .nc4, .loom.

To add more extensions, don't hesitate to open an issue or a pull request. Alternatively, you can use VS Code's workbench.editorAssociations setting to set H5Web as the default editor for additional extensions:

"workbench.editorAssociations": {
  "*.foo": "h5web.viewer",
},

You can also open any file in H5Web with right click -> Open with... -> H5Web (any extension), or, if you've already opened the file, by invoking View: Reopen Editor With... from the command palette:

GIF recording

Note that some of the extensions configured to open with H5Web are not guaranteed to map to HDF5 files. For instance, the .nc extension is also used for netCDF3 files, which are not based on HDF5 and are therefore not compatible with H5Web. If this is an issue, you can use the workbench.editorAssociations to restore the default editor association as follows:

"workbench.editorAssociations": {
  "*.nc": "default",
},

Supported HDF5 compression plugins

The extension supports reading datasets compressed with any of the plugins available in h5wasm-plugins@0.0.3.

Known limitations

This extension uses h5wasm to read HDF5 files and therefore suffers from the following limitations:

  • Files bigger than 2GB cannot be opened automatically from the VS Code Explorer. You will need to browse for them manually from the H5Web webview editor when requested.
  • External links cannot be resolved.