mirror of
https://github.com/sharkdp/bat.git
synced 2025-02-22 04:48:48 +00:00
Defaults *.fs to F#
This commit is contained in:
parent
233d375983
commit
fc121f0c87
@ -428,6 +428,7 @@ mod tests {
|
|||||||
assert_eq!(test.syntax_for_file("test.h"), "C++");
|
assert_eq!(test.syntax_for_file("test.h"), "C++");
|
||||||
assert_eq!(test.syntax_for_file("test.sass"), "Sass");
|
assert_eq!(test.syntax_for_file("test.sass"), "Sass");
|
||||||
assert_eq!(test.syntax_for_file("test.js"), "JavaScript (Babel)");
|
assert_eq!(test.syntax_for_file("test.js"), "JavaScript (Babel)");
|
||||||
|
assert_eq!(test.syntax_for_file("test.fs"), "F#");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
@ -23,6 +23,7 @@ impl<'a> SyntaxMapping<'a> {
|
|||||||
pub fn builtin() -> SyntaxMapping<'a> {
|
pub fn builtin() -> SyntaxMapping<'a> {
|
||||||
let mut mapping = Self::empty();
|
let mut mapping = Self::empty();
|
||||||
mapping.insert("*.h", MappingTarget::MapTo("C++")).unwrap();
|
mapping.insert("*.h", MappingTarget::MapTo("C++")).unwrap();
|
||||||
|
mapping.insert("*.fs", MappingTarget::MapTo("F#")).unwrap();
|
||||||
mapping
|
mapping
|
||||||
.insert("build", MappingTarget::MapToUnknown)
|
.insert("build", MappingTarget::MapToUnknown)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
@ -14,6 +14,8 @@ fn no_duplicate_extensions() {
|
|||||||
// The "Ruby Haml" syntax also comes with a '.sass' extension. However, we make sure
|
// The "Ruby Haml" syntax also comes with a '.sass' extension. However, we make sure
|
||||||
// that 'sass' is mapped to the 'Sass' syntax.
|
// that 'sass' is mapped to the 'Sass' syntax.
|
||||||
"sass",
|
"sass",
|
||||||
|
// The '.fs' extension appears in F# and GLSL. We default to F#.
|
||||||
|
"fs",
|
||||||
];
|
];
|
||||||
|
|
||||||
let assets = HighlightingAssets::from_binary();
|
let assets = HighlightingAssets::from_binary();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user