Syntax: add clang-format (#2076)

Highlight .clang-format files as YAML

Co-authored-by: Ari Archer <truncateddinosour@gmail.com>
Co-authored-by: David Peter <mail@david-peter.de>
This commit is contained in:
TruncatedDinosour 2022-03-06 19:01:49 +00:00 committed by GitHub
parent 97a98e037d
commit cde239e809
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -8,6 +8,8 @@
## Syntaxes
- Mapped clang-format config file (.clang-format) to YAML syntax (@TruncatedDinosour)
## Themes
## `bat` as a library

View File

@ -41,6 +41,9 @@ impl<'a> SyntaxMapping<'a> {
pub fn builtin() -> SyntaxMapping<'a> {
let mut mapping = Self::empty();
mapping.insert("*.h", MappingTarget::MapTo("C++")).unwrap();
mapping
.insert(".clang-format", MappingTarget::MapTo("YAML"))
.unwrap();
mapping.insert("*.fs", MappingTarget::MapTo("F#")).unwrap();
mapping
.insert("build", MappingTarget::MapToUnknown)