taplo
taplo copied to clipboard
VSCode Extension doesn't use extension settings
Hej,
it seems the VSCode extension does not use the extension formatter settings at all.
- I checked compact entries, but nothing is formatted
- in the workspace, all toml files display "this document has been excluded"
- adding a
.taplo.tomlwith includes does nothing
Is there anything I am missing?
The VS Code extension should recognize .taplo.toml (we use it in all our repositories), but you have to reload the window (restart) if you modify any of the settings there.
The VS Code extension does not respect all the latest configuration options though, because it is outdated. See https://github.com/tamasfe/taplo/issues/624#issuecomment-2228145196.
Here's what worked for me to get the VS Code extension to recognize my custom rules:
- Put a file called
.taplo.tomlin the root of your project with the configuration settings - Close VSCode and re-open it
Here are things that did NOT work. I tried saving and restarting VSCode after each one:
- Naming the config file
taplo.toml - Putting the following settings in either my User
settings.jsonor.vscode/settings.json
{
// ... other VSCode settings ...
"evenBetterToml.rules": [
{
"path": "rust-toolchain.toml",
"rules": {
"schema": {
"enabled": false
}
}
}
]
}
Note, I was trying to resolve the same issue as described here.