Feature Request: Support YAML Directives
- Dominant language
- Go
- Stars
- 886
- Forks
- 194
- PR merge metrics
- No merged PRs in 30d
Description
This is probably more a stylistic thing but if you have a yaml file
```yaml
%YAML 1.2
# yaml-language-server: $schema=https://json.schemastore.org/pre-commit-config.json
---
default_install_hook_types:
- pre-commit
...
```
and update it with you end up with
```yaml
# Copyright ...
# SPDX-License-Identifier: MPL-2.0
%YAML 1.2
# yaml-language-server: $schema=https://json.schemastore.org/pre-commit-config.json
---
default_install_hook_types:
- pre-commit
...
```
This contrasts with the behaviour of shell scripts etc. which maintain the shebang as the first line.
I don't think it particularly matters for TAG directives but in the case of the YAML directive should this be handled similarly?
Thanks
Contributor guide
Assessment
This issue has not been assessed yet.