Skip to content

Commit

Permalink
feat: Add support for Gleam programming language (github-linguist/lin…
Browse files Browse the repository at this point in the history
  • Loading branch information
kalkin committed May 17, 2022
1 parent 8480a0d commit b5d5486
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 1 deletion.
8 changes: 8 additions & 0 deletions languages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2080,6 +2080,14 @@ Git Config:
codemirror_mime_type: text/x-properties
tm_scope: source.gitconfig
language_id: 807968997
Gleam:
type: programming
color: "#ffaff3"
ace_mode: text
extensions:
- ".gleam"
tm_scope: source.gleam
language_id: 1054258749
Glyph:
type: programming
color: "#c1ac7f"
Expand Down
2 changes: 1 addition & 1 deletion linguist
1 change: 1 addition & 0 deletions src/linguist_aliases.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ lazy_static! {
("git config".to_string(), "Git Config".to_string()),
("gitconfig".to_string(), "Git Config".to_string()),
("gitmodules".to_string(), "Git Config".to_string()),
("gleam".to_string(), "Gleam".to_string()),
("glyph".to_string(), "Glyph".to_string()),
(
"glyph bitmap distribution format".to_string(),
Expand Down
1 change: 1 addition & 0 deletions src/linguist_extensions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ lazy_static! {
(".feature".to_string(), "Gherkin".to_string()),
(".story".to_string(), "Gherkin".to_string()),
(".gitconfig".to_string(), "Git Config".to_string()),
(".gleam".to_string(), "Gleam".to_string()),
(".glf".to_string(), "Glyph".to_string()),
(
".bdf".to_string(),
Expand Down
22 changes: 22 additions & 0 deletions tests/linguist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6231,6 +6231,28 @@ mod git_config {
}
}

mod gleam {
use file_expert::guess;
use file_expert::Guess;
use std::path::Path;

#[test]
fn test_0() {
let path = Path::new(&"./samples/Gleam/websocket.gleam");
let actual = guess(&path).unwrap();
let expected = Guess::Kind("Gleam".to_string());
assert_eq!(actual, expected);
}

#[test]
fn test_1() {
let path = Path::new(&"./samples/Gleam/contributor.gleam");
let actual = guess(&path).unwrap();
let expected = Guess::Kind("Gleam".to_string());
assert_eq!(actual, expected);
}
}

mod glyph_bitmap_distribution_format {
use file_expert::guess;
use file_expert::Guess;
Expand Down

0 comments on commit b5d5486

Please sign in to comment.