zed-industries/zed · error
query {file_name} is not supported by Zed and should be remo
Error message
query {file_name} is not supported by Zed and should be removed What it means
Raised during `extension test languages` when a file inside a language directory parses successfully as a QueryFile (e.g. highlights.scm, injections.scm) but the language's grammar failed to resolve or load, so Zed cannot compile the query. The with_context call augments the underlying grammar-loading error to state that language {name} declares query {path} without a usable tree-sitter grammar.
Source
Thrown at crates/extension_cli/src/main.rs:602
"Failed to parse tasks file at {path}",
path = file_path.display()
)
})?;
}
_ => {
if let Ok(_query) = file_name.parse::<QueryFile>() {
let grammar = grammar.with_context(|| {
format! {
"language {} provides query {} but no grammar",
config.name,
file_path.display()
}
})?;
let query_source = fs::read_to_string(&file_path)?;
let _query = Query::new(grammar, &query_source)?;
} else if file_name.ends_with(".scm") {
bail!("query {file_name} is not supported by Zed and should be removed")
} else if !context.is_known_resource(&file_path) {
bail!(
"'{file_name}' is not a supported file in a language directory and should be removed"
)
}
}
}
}
log::info!("loaded language {}", config.name);
}
Ok(())
}
async fn test_themes(
manifest: &ExtensionManifest,
extension_path: &Path,View on GitHub (pinned to 9d272b0363)
Solutions
- Verify the language entry in extension.toml declares a valid `grammar` field pointing to a tree-sitter grammar that clones and builds successfully
- Check that the grammar repository, path and revisions in the grammar declaration are correct and reachable
- Run the language tests locally with the extension CLI to confirm the grammar compiles before publishing
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/extension_cli/src/main.rs:602 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@9d272b0363 (2026-09-05).
Data as JSON: /api/errors/6409224fa19c8549.
Report an issue: GitHub.