taplo
taplo copied to clipboard
spurious taplo/didChangeSchemaAssociation messages
I used Taplo via the Zed TOML extension.
Recently I've noticed that when I have multiple open TOML files, opening a new file triggers taplo/didChangeSchemaAssociation events on all the existing files I have open. They look like this:
2024-10-31T08:41:20.755921-04:00 [INFO] Language server with id 8 sent unhandled notification taplo/didChangeSchemaAssociation:
{
"documentUri": "file:///Users/peter/zcode/zed/docs/book.toml",
"schemaUri": null,
"meta": null
}
2024-10-31T08:41:20.756075-04:00 [INFO] Language server with id 8 sent unhandled notification taplo/didChangeSchemaAssociation:
{
"documentUri": "file:///Users/peter/zcode/zed/crates/assistant/Cargo.toml",
"schemaUri": "https://json.schemastore.org/cargo.json",
"meta": {
"name": "Cargo Manifest",
"description": "Manifest for Cargo, the Rust package manager and build tool",
"source": "catalog",
"catalog_url": "https://www.schemastore.org/api/json/catalog.json"
}
}
For example:
- Open a.toml
- Open b.toml (get taplo/didChangeSchemaAssociation for a.toml)
- Open c.toml (get taplo/didChangeSchemaAssociation for a.toml, b.toml)
- Open d.toml (get taplo/didChangeSchemaAssociation for a.toml, b.toml, c.toml) etc
It seems harmless, but the fact that it scales with the number of open TOML files is especially annoying.
Also, it's wrong? taplo "didn't" change the schema association.
Associated Zed issue:
- https://github.com/zed-industries/zed/issues/20025