A Prettier 3 plugin for stable WESL syntax. It registers the wesl parser for
*.wesl files.
Warning
This AI-generated slop exists mainly to support development of my own projects. It is a temporary stopgap to fill the void in WESL tooling until something better comes along, and this repository may vanish at any time.
npm install --save-dev github:ludwigbrida/prettier-plugin-weslThen add the plugin to prettier.config.ts:
import type { Config } from "prettier";
const config: Config = {
plugins: ["prettier-plugin-wesl"],
};
export default config;Run prettier --write "**/*.wesl" as usual.
To update the GitHub-installed plugin after new commits are available, run:
npm update prettier-plugin-weslThe consuming project's lockfile resolves main to a specific commit, so a
normal npm install does not fetch newer commits automatically.
The plugin supports only stable WESL syntax, including imports, visibility modifiers, and conditional translation attributes. Experimental extensions such as generics, const injection, and virtual modules are not supported.
This software is provided under the MIT license.