zed-industries/zed · error

'{file_name}' is not a supported file in a language director

Error message

'{file_name}' is not a supported file in a language directory and should be removed

What it means

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.

Source

Thrown at crates/extension_cli/src/main.rs:604

                                )
                            })?;
                }
                _ => {
                    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,
    fs: Arc<dyn Fs>,
) -> Result<()> {

View on GitHub (pinned to 9d272b0363)

Solutions

  1. Remove the unsupported file from the language directory or move it elsewhere in the extension
  2. 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)
  3. Consult the Zed extension documentation for the list of files allowed in a language directory
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/extension_cli/src/main.rs:604 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/1e1a2a99de56cfc0. Report an issue: GitHub.