Skip to content

Commit

Permalink
add support for Groovy #163
Browse files Browse the repository at this point in the history
  • Loading branch information
o2sh committed Nov 14, 2019
1 parent 869d4f1 commit 90bdc4e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
18 changes: 18 additions & 0 deletions resources/groovy.ascii
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{0} @
{0} @@@
{0} @@@@@
{0} @@@@@@@
{0} @@@@@@@@@
{0} {1} ____ ____{0}@@@@@@@@@@@{1}_ _ _ _
{0}@@@@@@@{1} / _ |/ ___) _ \ / _ \ | | | | | |{0}@@@@@@@
{0} @@@@{1}( ( | | | | |_| | |_| \ V /| |_| |{0}@@@@
{0} @{1} \_|| |_| \___/ \___/ \_/ \__ |{0}@
{0} {1}(_____|{0}@@@@@@@@@@@@@@@@@@@@@{1}(____/
{0} @@@@@@@@@@@@@@@@@@
{0} @@@@@@@@@@@@@@@@@@
{0} @@@@@@@@@@@@@@@@@@@@
{0} @@@@@@@@@ @@@@@@@@@
{0} @@@@@@@ @@@@@@@
{0} @@@@@ @@@@@
{0} @@@ @@@
{0} @ @
6 changes: 6 additions & 0 deletions src/language.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ pub enum Language {
FortranModern,
FSharp,
Go,
Groovy,
Haskell,
HTML,
Idris,
Expand Down Expand Up @@ -89,6 +90,7 @@ impl std::fmt::Display for Language {
Language::FortranModern => write!(f, "Fortran"),
Language::FSharp => write!(f, "FSharp"),
Language::Go => write!(f, "Go"),
Language::Groovy => write!(f, "Groovy"),
Language::Haskell => write!(f, "Haskell"),
Language::HTML => write!(f, "HTML"),
Language::Idris => write!(f, "Idris"),
Expand Down Expand Up @@ -150,6 +152,7 @@ impl From<tokei::LanguageType> for Language {
tokei::LanguageType::FortranModern => Language::FortranModern,
tokei::LanguageType::FSharp => Language::FSharp,
tokei::LanguageType::Go => Language::Go,
tokei::LanguageType::Groovy => Language::Groovy,
tokei::LanguageType::Haskell => Language::Haskell,
tokei::LanguageType::Html => Language::HTML,
tokei::LanguageType::Idris => Language::Idris,
Expand Down Expand Up @@ -210,6 +213,7 @@ impl Language {
Language::FortranModern => include_str!("../resources/f90.ascii"),
Language::FSharp => include_str!("../resources/fsharp.ascii"),
Language::Go => include_str!("../resources/go.ascii"),
Language::Groovy => include_str!("../resources/groovy.ascii"),
Language::Haskell => include_str!("../resources/haskell.ascii"),
Language::HTML => include_str!("../resources/html.ascii"),
Language::Idris => include_str!("../resources/idris.ascii"),
Expand Down Expand Up @@ -280,6 +284,7 @@ impl Language {
],
Language::FSharp => vec![Color::BrightBlue, Color::Cyan],
Language::Go => vec![Color::White],
Language::Groovy => vec![Color::Cyan, Color::BrightWhite],
Language::Haskell => vec![Color::BrightBlue, Color::BrightMagenta, Color::Blue],
Language::HTML => vec![Color::Red, Color::White],
Language::Idris => vec![Color::Red],
Expand Down Expand Up @@ -399,6 +404,7 @@ fn get_all_language_types() -> Vec<tokei::LanguageType> {
tokei::LanguageType::FortranModern,
tokei::LanguageType::FSharp,
tokei::LanguageType::Go,
tokei::LanguageType::Groovy,
tokei::LanguageType::Haskell,
tokei::LanguageType::Html,
tokei::LanguageType::Idris,
Expand Down

0 comments on commit 90bdc4e

Please sign in to comment.