Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Typst grammar #76

Merged
merged 2 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
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
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