From 887bbbc37508c68d6e65bc52d7e58b20fa9a850c Mon Sep 17 00:00:00 2001 From: Yerlan Date: Wed, 20 Nov 2024 23:39:34 +0100 Subject: [PATCH] Adding NestedText language support (#11987) Co-authored-by: Yerlan Sergaziyev --- book/src/generated/lang-support.md | 1 + languages.toml | 9 +++++++++ runtime/queries/nestedtext/highlights.scm | 1 + runtime/queries/nestedtext/indents.scm | 1 + runtime/queries/nestedtext/injections.scm | 1 + runtime/queries/nestedtext/textobjects.scm | 1 + 6 files changed, 14 insertions(+) create mode 100644 runtime/queries/nestedtext/highlights.scm create mode 100644 runtime/queries/nestedtext/indents.scm create mode 100644 runtime/queries/nestedtext/injections.scm create mode 100644 runtime/queries/nestedtext/textobjects.scm diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md index 18570695c..6c250ec4f 100644 --- a/book/src/generated/lang-support.md +++ b/book/src/generated/lang-support.md @@ -136,6 +136,7 @@ | move | ✓ | | | | | msbuild | ✓ | | ✓ | | | nasm | ✓ | ✓ | | | +| nestedtext | ✓ | ✓ | ✓ | | | nickel | ✓ | | ✓ | `nls` | | nim | ✓ | ✓ | ✓ | `nimlangserver` | | nix | ✓ | ✓ | | `nil`, `nixd` | diff --git a/languages.toml b/languages.toml index 5bb3d298d..026c8bcd3 100644 --- a/languages.toml +++ b/languages.toml @@ -1334,6 +1334,15 @@ injection-regex = "yml|yaml" name = "yaml" source = { git = "https://github.com/ikatyang/tree-sitter-yaml", rev = "0e36bed171768908f331ff7dff9d956bae016efb" } +[[language]] +name = "nestedtext" +scope = "text.nested" +injection-regex = "nestedtext" +file-types = ["nt"] +comment-token = "#" +indent = { tab-width = 4, unit = " " } +grammar = "yaml" + [[language]] name = "haskell" scope = "source.haskell" diff --git a/runtime/queries/nestedtext/highlights.scm b/runtime/queries/nestedtext/highlights.scm new file mode 100644 index 000000000..4ba254e82 --- /dev/null +++ b/runtime/queries/nestedtext/highlights.scm @@ -0,0 +1 @@ +; inherits: yaml diff --git a/runtime/queries/nestedtext/indents.scm b/runtime/queries/nestedtext/indents.scm new file mode 100644 index 000000000..4ba254e82 --- /dev/null +++ b/runtime/queries/nestedtext/indents.scm @@ -0,0 +1 @@ +; inherits: yaml diff --git a/runtime/queries/nestedtext/injections.scm b/runtime/queries/nestedtext/injections.scm new file mode 100644 index 000000000..4ba254e82 --- /dev/null +++ b/runtime/queries/nestedtext/injections.scm @@ -0,0 +1 @@ +; inherits: yaml diff --git a/runtime/queries/nestedtext/textobjects.scm b/runtime/queries/nestedtext/textobjects.scm new file mode 100644 index 000000000..4ba254e82 --- /dev/null +++ b/runtime/queries/nestedtext/textobjects.scm @@ -0,0 +1 @@ +; inherits: yaml