From 7083ad03201ea9414cd86060ac57f0c72364a7d1 Mon Sep 17 00:00:00 2001 From: bain Date: Thu, 4 Jul 2024 00:04:19 +0200 Subject: [PATCH] add custom injections nvim --- .../after/queries/javascript/injections.scm | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 nvim/.config/nvim/after/queries/javascript/injections.scm diff --git a/nvim/.config/nvim/after/queries/javascript/injections.scm b/nvim/.config/nvim/after/queries/javascript/injections.scm new file mode 100644 index 0000000..d5cb68e --- /dev/null +++ b/nvim/.config/nvim/after/queries/javascript/injections.scm @@ -0,0 +1,20 @@ +; extends + +( + [ + (template_string) + ] @injection.content + (#match? @injection.content "(SELECT|INSERT|UPDATE|DELETE|CREATE).+(FROM|INTO|VALUES|SET|TABLE).*(WHERE|GROUP BY)?") + (#offset! @injection.content 0 1 0 -1) + (#set! injection.language "sql") + (#set! injection.include-children) +) + +( + [ + (string_fragment) + ] @injection.content + (#match? @injection.content "(SELECT|INSERT|UPDATE|DELETE|CREATE).+(FROM|INTO|VALUES|SET|TABLE).*(WHERE|GROUP BY)?") + (#set! injection.language "sql") + (#set! injection.include-children) +)