taplo
taplo copied to clipboard
Unexpected error in `app.toml`
When I opened app.toml, Even Better TOML told me that that Additional properties are not allowed ('pid' were unexpected). But if I changed its name, it didn't show any error message anymore. I guess there must be some schema on the especial file named app.toml but I guess it is not expected for everyone.
I have the same problem with file conf.toml. Whole is red and full of Additional properties are not allowed bugs. And renamed .toml is OK. This plugin is really "magic".
I think the fact that the plugin is magic is more often useful than not. I expect most people to use TOML files to configure well-known tools with a schema defined, rather than custom TOML files with conflicting naming with well-known files.
However, it should be easy to disable schema on a per-file basis, but it doesn't seem to be the case. It's possible to set schema.enabled = false in taplo.toml, but this seems to only be taken into account by the CLI, not by the LSP server.
I think it would also be nice to have the #:schema directive support a way to disable schema for the file. Currently, empty schema directives are ignored, maybe they could instead mean that schema should be disabled. Otherwise, a new directive could be introduced.
Yes, it is right. But I am not sure it is well-known... So what is the app.toml for? Google doesn't know. So why should others know? I think we should must be careful.
If you're using VS Code and Even Better TOML 0.19.0 or 0.19.2 then you're probably hitting #426 which has been fixed in 0.19.1 (but has been reverted because of #434). In that case, the schema is actually for app.json for Expo SDK.
Get it. But I still do not think it's well-known.
Yes, I agree not all schemas in the catalog have the same weight and being able to easily disable or overwrite a schema is an important feature, as mentioned in https://github.com/tamasfe/taplo/issues/457#issuecomment-1677931199 already. However, this will need a PR. I've already added the Help needed label for that.
same problem with metadata.toml containing run_in_transaction = false (that's Diesel migration metadata). Don't even need to open it, it just needs to be somewhere in the path of my large monorepo and it raises errors.
The bottom of the editor says "no schema selected", but it still raises errors.
I want the schema to stay enabled for Cargo.toml, but I'd like to disable other guesses. How do I do this? Where is the related code?