https://github.com/computer-graphics-tools/metal-analyzer
https://github.com/computer-graphics-tools/metal-analyzer
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/computer-graphics-tools/metal-analyzer
- Owner: computer-graphics-tools
- License: mit
- Created: 2026-02-11T16:28:09.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2026-02-17T15:28:15.000Z (4 months ago)
- Last Synced: 2026-02-18T01:21:12.287Z (4 months ago)
- Language: Rust
- Size: 524 KB
- Stars: 10
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-zed-extensions - Metal
README
metal-analyzer is a language server that provides IDE functionality for
writing Apple's Metal Shading Language programs. You can use it with
any editor that supports the [Language Server
Protocol](https://microsoft.github.io/language-server-protocol/) (VS
Code, Zed, etc).
metal-analyzer features include real-time diagnostics (via `xcrun metal`),
auto-completion for built-in types, functions, and keywords, hover
documentation, and integrated formatting (with clang-format).
## Quick Start
See [Installation](./docs/installation.md) for setup instructions for
VS Code and Zed.
## CLI
metal-analyzer can also be used as a command-line formatter:
```sh
# Format files in-place
metal-analyzer format shader.metal compute.metal
# Check formatting without modifying files (exits 1 if changes needed)
metal-analyzer format --check shader.metal
# Format from stdin
cat shader.metal | metal-analyzer format
```
Formatting style is resolved in order:
1. **`metalfmt.toml`** — walks up from the source file looking for a
`metalfmt.toml` (see [Formatting](./docs/formatting.md)).
2. **`.clang-format`** — if no `metalfmt.toml` is found, clang-format's
built-in file discovery is used (`.clang-format` / `_clang-format`).
3. **No config** — if neither file is found, the file is left unchanged.
See `metal-analyzer format --help` for all options.
## Configuration
See [Configuration](./docs/configuration.md) for available settings.
## License
This project is licensed under [MIT license](LICENSE).