Skip to content

Commit

Permalink
Merge pull request #76 from realybin/master
Browse files Browse the repository at this point in the history
Add Typst grammar
  • Loading branch information
danipen authored Sep 5, 2024
2 parents 3c5fb57 + 4934496 commit ea0563b
Show file tree
Hide file tree
Showing 9 changed files with 1,767 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/TextMateSharp.Grammars.Tests/GrammarTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public void Get_Available_Languages_Should_Return_Content()
{
RegistryOptions options = new RegistryOptions(ThemeName.Light);

Assert.That(options.GetAvailableLanguages().Count, Is.EqualTo(61));
Assert.That(options.GetAvailableLanguages().Count, Is.EqualTo(63));
}

[Test]
Expand Down Expand Up @@ -111,7 +111,10 @@ public void Assert_Every_Grammar_With_Language_Configuration_File_Has_Language_C
{
if (!string.IsNullOrEmpty(language.ConfigurationFile))
{
Assert.That(language.Configuration, Is.Not.Null);
if (language.Configuration == null)
{
Assert.Fail(string.Format("[{0} grammar]: Language configuration is null", language.Id));
}
}
}
catch (Exception ex)
Expand Down
1 change: 1 addition & 0 deletions src/TextMateSharp.Grammars/GrammarNames.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ internal class GrammarNames
"SQL",
"Swift",
"TypescriptBasics",
"Typst",
"VB",
"XML",
"YAML"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"registrations": [
{
"component": {
"type": "git",
"git": {
"name": "Myriad-Dreamin/tinymist",
"repositoryUrl": "https://github.com/Myriad-Dreamin/tinymist",
"commitHash": "1f9a42c2e863f6b1fe8624da796e47adf44a9a83"
}
},
"license": "Apache-2.0",
"version": "0.11.20"
}
],
"version": 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"comments": {
"lineComment": "//",
"blockComment": ["/*", "*/"]
},
"brackets": [
["[", "]"],
["{", "}"],
["(", ")"]
],
"autoClosingPairs": [
{
"open": "[",
"close": "]"
},
{
"open": "{",
"close": "}"
},
{
"open": "(",
"close": ")"
},
{
"open": "\"",
"close": "\"",
"notIn": ["string"]
},
{
"open": "$",
"close": "$",
"notIn": ["string"]
},

["“", "”"],
["‘", "’"],
["《", "》"],
["〈", "〉"],
["(", ")"],
["『", "』"],
["「", "」"],
["【", "】"],
["〖", "〗"],
["〔", "〕"],
["[", "]"],
["{", "}"]
],
"autoCloseBefore": ";:.,=}])>$ \n\t",
"surroundingPairs": [
["[", "]"],
["{", "}"],
["(", ")"],
["\"", "\""],
["*", "*"],
["_", "_"],
["`", "`"],
["$", "$"],

["“", "”"],
["‘", "’"],
["《", "》"],
["〈", "〉"],
["(", ")"],
["『", "』"],
["「", "」"],
["【", "】"],
["〖", "〗"],
["〔", "〕"],
["[", "]"],
["{", "}"]
]
}
Loading

0 comments on commit ea0563b

Please sign in to comment.