From 7efd53759a46c36222791d4ff0597cdc0d17f59b Mon Sep 17 00:00:00 2001 From: qwjyh Date: Wed, 2 Oct 2024 19:15:34 +0900 Subject: [PATCH] (WIP) new: nvim: tree-sitter injection for julia sql string --- .../neovim/after/queries/julia/injections.scm | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/dotfiles/neovim/after/queries/julia/injections.scm b/dotfiles/neovim/after/queries/julia/injections.scm index 60d3f24..964cc3b 100644 --- a/dotfiles/neovim/after/queries/julia/injections.scm +++ b/dotfiles/neovim/after/queries/julia/injections.scm @@ -5,3 +5,42 @@ (#eq? @_prefix "md") (#set! injection.language "markdown") (#offset! @injection.content 0 2 0 -1)) + +; ((prefixed_string_literal +; prefix: (identifier) @_prefix) @injection.content +; (#eq? @_prefix "sql") +; (#set! injection.language "sql") +; (#offset! @injection.content 0 4 0 -1)) +; +; ((prefixed_string_literal +; prefix: (identifier) @_prefix) @injection.content +; (#eq? @_prefix "s") +; (#set! injection.language "sql") +; (#offset! @injection.content 0 3 0 -1)) +; +; ((prefixed_string_literal +; prefix: (identifier) @_prefix) @injection.content +; (#eq? @_prefix "t") +; (#set! injection.language "regex") +; (#offset! @injection.content 0 2 0 -1)) +; +; ((prefixed_string_literal +; prefix: (identifier) @_prefix) @injection.content +; (#eq? @_prefix "ts") +; (#set! injection.language "regex") +; (#offset! @injection.content 0 2 0 -1)) +; +; ((prefixed_string_literal +; prefix: (identifier) @_prefix) @injection.content +; (#eq? @_prefix "tu") +; (#set! injection.language "regex") +; (#offset! @injection.content 0 3 0 -1)) +; +; ((prefixed_string_literal +; prefix: (identifier) @_prefix) @injection.content +; (#eq? @_prefix "sql") +; ; (#offset! @injection.content 0 2 0 -1) +; ; (#offset! @injection.content 0 6 0 -3) +; (#gsub! @injection.content "^\"%\"" "%1") +; (#set! injection.language "sql") +; )