Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bluebrown/vscode-extension-yamlfmt
VS Code extension to format yaml files with https://github.com/google/yamlfmt
https://github.com/bluebrown/vscode-extension-yamlfmt
formatter vscode vscode-extension yaml yamlfmt
Last synced: 20 days ago
JSON representation
VS Code extension to format yaml files with https://github.com/google/yamlfmt
- Host: GitHub
- URL: https://github.com/bluebrown/vscode-extension-yamlfmt
- Owner: bluebrown
- License: 0bsd
- Created: 2023-07-19T16:43:30.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-01T10:25:22.000Z (7 months ago)
- Last Synced: 2024-06-01T11:33:15.882Z (7 months ago)
- Topics: formatter, vscode, vscode-extension, yaml, yamlfmt
- Language: JavaScript
- Homepage:
- Size: 46.9 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# VS Code Extension - yamlfmt
This extension calls the external binary [yamlfmt][1].
## Usage
> **Note** The binary must exist in the system path. See the [official install
> instructions][2].### Configuration
The binary is invoked with the [workspace folder][3], containing the document to
format, as `cwd`. So the [official documentation][4], regarding `yamlfmt`
configuration, applies.If the file is not opened from a workspace, the extension will fallback to the
files parent directory as `cwd`. If that is not sufficient to pick up the right
config file, you can create a .yamlfmt at one of the common locations. i.e.
`~/config/yamlfmt/` or export `XDG_CONFIG_HOME`. Alternatively point to the
right at via the `-conf` flag, in your `settings.json`.You can pass [extra flags][5] from the `settings.json`:
```json
{
"yamlfmt.args": []
}
```> **Note** The flag `-in` is always appended to the args, since the current
> document is passed via stdin to yamlfmt.## Contribution
Read the [maintainer notes][6] for more info.
[1]: https://github.com/google/yamlfmt
[2]: https://github.com/google/yamlfmt#installation
[3]: https://code.visualstudio.com/docs/editor/workspaces
[4]: https://github.com/google/yamlfmt/blob/main/docs/config-file.md
[5]: https://github.com/google/yamlfmt/blob/main/docs/command-usage.md#operation-flags
[6]: https://github.com/bluebrown/vscode-extension-yamlfmt/blob/main/MAINTAINER.md