Open KevinT3Hu opened 8 months ago
Toml validation in vscode is only available if using Even Better Toml
extenstion which supports reading schemas from other extensions, see https://taplo.tamasfe.dev/configuration/developing-schemas.html#visual-studio-code-extensions. However, it only works with external URLs and doesn't support reading from internal vscode urls (which we use).
I think the next step would be to look into uploading tauri config schema to https://www.schemastore.org/json/ and let Even Better Toml
auto detect our config and pull the schema from the store.
btw you can explicitly set the schema in your Tauri.toml
like this:
"$schema" = "https://github.com/tauri-apps/tauri/releases/download/tauri-build-v1.5.0/schema.json"
[build]
before-build-command = ""
# ..etc
Notice that you need to match the version in the URL to the version of tauri-build
in your Cargo.toml
This extension now supports validation for tauri.conf.json, but not for Tauri.toml.
It would be nice to be able to switch to toml since that's common practice in the Rust community so I think this is quite needed.