mirror of
				https://github.com/sharkdp/bat.git
				synced 2025-11-04 09:01:56 +00:00 
			
		
		
		
	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:
		
				
					committed by
					
						
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							97a98e037d
						
					
				
				
					commit
					cde239e809
				
			@@ -8,6 +8,8 @@
 | 
			
		||||
 | 
			
		||||
## Syntaxes
 | 
			
		||||
 | 
			
		||||
- Mapped clang-format config file (.clang-format) to YAML syntax (@TruncatedDinosour)
 | 
			
		||||
 | 
			
		||||
## Themes
 | 
			
		||||
 | 
			
		||||
## `bat` as a library
 | 
			
		||||
 
 | 
			
		||||
@@ -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)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user