From d8f482e11e2dec544ede636464cf6a87e32bd1f7 Mon Sep 17 00:00:00 2001 From: Brett Lyons Date: Fri, 3 Feb 2023 07:24:22 -0700 Subject: [PATCH] Add MSBuild language based on XML grammar (#5793) --- book/src/generated/lang-support.md | 1 + languages.toml | 17 +++++++++++++++++ runtime/queries/msbuild/highlights.scm | 1 + runtime/queries/msbuild/indents.scm | 1 + runtime/queries/msbuild/injections.scm | 1 + 5 files changed, 21 insertions(+) create mode 100644 runtime/queries/msbuild/highlights.scm create mode 100644 runtime/queries/msbuild/indents.scm create mode 100644 runtime/queries/msbuild/injections.scm diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md index 1711ec36d..99fe82b33 100644 --- a/book/src/generated/lang-support.md +++ b/book/src/generated/lang-support.md @@ -83,6 +83,7 @@ | mermaid | ✓ | | | | | meson | ✓ | | ✓ | | | mint | | | | `mint` | +| msbuild | ✓ | | ✓ | | | nickel | ✓ | | ✓ | `nls` | | nix | ✓ | | | `nil` | | nu | ✓ | | | | diff --git a/languages.toml b/languages.toml index 09ba2a2a1..8520b12d7 100644 --- a/languages.toml +++ b/languages.toml @@ -2117,3 +2117,20 @@ roots = [] comment-token = "#" indent = { tab-width = 4, unit = " " } grammar = "python" + +[[language]] +name = "msbuild" +scope = "source.msbuild" +injection-regex = "msbuild" +file-types = ["proj", "vbproj", "csproj", "fsproj", "targets", "props"] +indent = { tab-width = 2, unit = " " } +roots = [] +grammar = "xml" + +[language.auto-pairs] +'(' = ')' +'{' = '}' +'[' = ']' +'"' = '"' +"'" = "'" +"<" = ">" diff --git a/runtime/queries/msbuild/highlights.scm b/runtime/queries/msbuild/highlights.scm new file mode 100644 index 000000000..27b10d95d --- /dev/null +++ b/runtime/queries/msbuild/highlights.scm @@ -0,0 +1 @@ +; inherits: xml diff --git a/runtime/queries/msbuild/indents.scm b/runtime/queries/msbuild/indents.scm new file mode 100644 index 000000000..27b10d95d --- /dev/null +++ b/runtime/queries/msbuild/indents.scm @@ -0,0 +1 @@ +; inherits: xml diff --git a/runtime/queries/msbuild/injections.scm b/runtime/queries/msbuild/injections.scm new file mode 100644 index 000000000..27b10d95d --- /dev/null +++ b/runtime/queries/msbuild/injections.scm @@ -0,0 +1 @@ +; inherits: xml