Skip to content

Commit

Permalink
add coloring to let statements
Browse files Browse the repository at this point in the history
  • Loading branch information
u9g committed Apr 22, 2024
1 parent 9e7c42c commit 2014e3f
Showing 1 changed file with 39 additions and 1 deletion.
40 changes: 39 additions & 1 deletion syntaxes/gleam.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,47 @@
},
{
"include": "#import"
},
{
"include": "#let"
}
],
"repository": {
"let": {
"patterns": [
{
"begin": "(let)",
"beginCaptures": {
"1": {
"name": "storage.type.gleam"
}
},
"patterns": [
{
"include": "#inside_let"
}
],
"end": "(=)",
"endCaptures": {
"1": {
"name": "keyword.operator.assignment.gleam"
}
}
}
]
},
"inside_let": {
"patterns": [
{
"match": "([a-z_0-9]+)",
"name": "variable.other.readwrite.gleam"
},
{
"match": "(assert)",
"name": "keyword.gleam"
}
]
},
"import": {
"patterns": [
{
Expand Down Expand Up @@ -67,7 +105,7 @@
"patterns": [
{
"name": "keyword.control.gleam",
"match": "\\b(as|use|case|if|fn|let|assert|pub|type|opaque|const|todo|panic)\\b"
"match": "\\b(as|use|case|if|fn|assert|pub|type|opaque|const|todo|panic)\\b"
},
{
"name": "keyword.operator.arrow.gleam",
Expand Down

0 comments on commit 2014e3f

Please sign in to comment.