Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for validation in Tauri.toml #240

Open
KevinT3Hu opened this issue Feb 18, 2024 · 3 comments
Open

Support for validation in Tauri.toml #240

KevinT3Hu opened this issue Feb 18, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@KevinT3Hu
Copy link

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.

@FabianLars FabianLars added the enhancement New feature or request label Feb 18, 2024
@amrbashir
Copy link
Member

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).

@amrbashir
Copy link
Member

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.

@amrbashir
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants