Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ pub enum Lang {
Css,
CUDA,
CUDAHeader,
Cython,
D,
Dart,
DeviceTree,
Expand Down Expand Up @@ -184,6 +185,7 @@ impl Lang {
Css => "CSS",
CUDA => "CUDA",
CUDAHeader => "CUDA Header",
Cython => "Cython",
D => "D",
Dart => "Dart",
DeviceTree => "DeviceTree",
Expand Down Expand Up @@ -398,6 +400,7 @@ pub fn lang_from_ext(filepath: &str) -> Lang {
"purs" => PureScript,
"arr" => Pyret,
"py" => Python,
"pxi" | "pxd" | "pyx" => Cython,
"r" => R,
"rake" | "rb" => Ruby,
"rhtml" | "erb" => RubyHtml,
Expand Down Expand Up @@ -468,9 +471,9 @@ pub fn counter_config_for_lang<'a>(lang: Lang) -> (SmallVec<[&'a str; 3]>, Small
Perl => (smallvec!["#"], smallvec![("=pod", "=cut")]),
Puppet => (smallvec!["#"], smallvec![]),
Pyret => (smallvec!["#"], smallvec![("#|", "|#")]),
Python => (smallvec!["#"], smallvec![("'''", "'''")]),
Ruby => (smallvec!["#"], smallvec![("=begin", "=end")]),
Sql => (smallvec!["--"], smallvec![("/*", "*/")]),
Python | Cython => (smallvec!["#"], smallvec![("'''", "'''")]),

Haskell | Idris | Agda | PureScript | Elm => (smallvec!["--"], smallvec![("{-", "-}")]),

Expand Down