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

Unexpected error in app.toml #457

Open
PeterlitsZo opened this issue Aug 14, 2023 · 7 comments
Open

Unexpected error in app.toml #457

PeterlitsZo opened this issue Aug 14, 2023 · 7 comments

Comments

@PeterlitsZo
Copy link

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.

@malaschitz
Copy link

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

@ia0
Copy link
Collaborator

ia0 commented Aug 14, 2023

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.

@PeterlitsZo
Copy link
Author

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.

@ia0
Copy link
Collaborator

ia0 commented Aug 15, 2023

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.

@PeterlitsZo
Copy link
Author

Get it. But I still do not think it's well-known.

@ia0
Copy link
Collaborator

ia0 commented Aug 16, 2023

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 #457 (comment) already. However, this will need a PR. I've already added the Help needed label for that.

@Ten0
Copy link

Ten0 commented May 14, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants