{"record":{"id":"1e1a2a99de56cfc0","repo":"zed-industries/zed","slug":"file-name-is-not-a-supported-file-in-a-languag","errorCode":null,"errorMessage":"'{file_name}' is not a supported file in a language directory and should be removed","messagePattern":"'(.+?)' is not a supported file in a language directory and should be removed","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/extension_cli/src/main.rs","lineNumber":604,"sourceCode":"                                )\n                            })?;\n                }\n                _ => {\n                    if let Ok(_query) = file_name.parse::<QueryFile>() {\n                        let grammar = grammar.with_context(|| {\n                            format! {\n                                \"language {} provides query {} but no grammar\",\n                                config.name,\n                                file_path.display()\n                            }\n                        })?;\n\n                        let query_source = fs::read_to_string(&file_path)?;\n                        let _query = Query::new(grammar, &query_source)?;\n                    } else if file_name.ends_with(\".scm\") {\n                        bail!(\"query {file_name} is not supported by Zed and should be removed\")\n                    } else if !context.is_known_resource(&file_path) {\n                        bail!(\n                            \"'{file_name}' is not a supported file in a language directory and should be removed\"\n                        )\n                    }\n                }\n            }\n        }\n\n        log::info!(\"loaded language {}\", config.name);\n    }\n\n    Ok(())\n}\n\nasync fn test_themes(\n    manifest: &ExtensionManifest,\n    extension_path: &Path,\n    fs: Arc<dyn Fs>,\n) -> Result<()> {","sourceCodeStart":586,"sourceCodeEnd":622,"githubUrl":"https://github.com/zed-industries/zed/blob/9d272b036335401f339d024ea94968fd51016c40/crates/extension_cli/src/main.rs#L586-L622","documentation":"A generic validation error from `extension test languages`: a file was found in the language directory that is neither a recognized configuration file nor a supported query file name. Zed only accepts known QueryFile names (such as highlights.scm, injections.scm, brackets.scm, etc.) plus language config files; anything else is rejected and the author is told to remove it.","triggerScenarios":"Thrown at crates/extension_cli/src/main.rs:604 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the unsupported file from the language directory or move it elsewhere in the extension","Rename the file to a supported query file name if it was meant to be a tree-sitter query (e.g. highlights.scm, indents.scm, outline.scm)","Consult the Zed extension documentation for the list of files allowed in a language directory"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9d272b036335401f339d024ea94968fd51016c40","analyzedAt":"2026-09-05T10:33:00.413Z","contentChangedAt":"2026-09-05T10:33:00.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}