From 3e88f317832a02d6321ccd273086adb73b8f110f Mon Sep 17 00:00:00 2001 From: Jaakko Paju Date: Mon, 19 Feb 2024 01:46:13 +0200 Subject: [PATCH] Add textobject queries for Nix (#9659) * Add textobject queries for Nix * Add to lang-support.md --- book/src/generated/lang-support.md | 2 +- runtime/queries/nix/textobjects.scm | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 runtime/queries/nix/textobjects.scm diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md index a37e165f29ef3..09ed4dac564d4 100644 --- a/book/src/generated/lang-support.md +++ b/book/src/generated/lang-support.md @@ -112,7 +112,7 @@ | nasm | ✓ | ✓ | | | | nickel | ✓ | | ✓ | `nls` | | nim | ✓ | ✓ | ✓ | `nimlangserver` | -| nix | ✓ | | | `nil` | +| nix | ✓ | ✓ | | `nil` | | nu | ✓ | | | `nu` | | nunjucks | ✓ | | | | | ocaml | ✓ | | ✓ | `ocamllsp` | diff --git a/runtime/queries/nix/textobjects.scm b/runtime/queries/nix/textobjects.scm new file mode 100644 index 0000000000000..1508d4c2b79dc --- /dev/null +++ b/runtime/queries/nix/textobjects.scm @@ -0,0 +1,9 @@ +(comment) @comment.inside +(comment)+ @comment.around + +(formals + ((_) @parameter.inside . ","? @parameter.around) @parameter.around) + +(function_expression + body: (_) @function.inside) @function.around +