Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

languages: Recognize .clang-format as YAML (#43469)

Peter Tripp98e369285bd8
diff --git a/crates/languages/src/yaml/config.toml b/crates/languages/src/yaml/config.toml
index e941497bf3f..8834b3205af 100644
--- a/crates/languages/src/yaml/config.toml
+++ b/crates/languages/src/yaml/config.toml
@@ -1,6 +1,6 @@
name = "YAML"
grammar = "yaml"
-path_suffixes = ["yml", "yaml", "pixi.lock"]
+path_suffixes = ["yml", "yaml", "pixi.lock", "clang-format"]
line_comments = ["# "]
autoclose_before = ",]}"
brackets = [
diff --git a/docs/src/languages/c.md b/docs/src/languages/c.md
index 7f6e0ba6b2e..565b0b5acbe 100644
--- a/docs/src/languages/c.md
+++ b/docs/src/languages/c.md
@@ -27,9 +27,10 @@ By default clang and gcc will recognize `*.C` and `*.H` (uppercase extensions) a
## Formatting
-By default Zed will use the `clangd` language server for formatting C code. The Clangd is the same as the `clang-format` CLI tool. To configure this you can add a `.clang-format` file. For example:
+By default Zed will use the `clangd` language server for formatting C code like the `clang-format` CLI tool. To configure this you can add a `.clang-format` file. For example:
```yaml
+# yaml-language-server: $schema=https://json.schemastore.org/clang-format-21.x.json
---
BasedOnStyle: GNU
IndentWidth: 2