dotfiles/config/nvim/after/queries/go/injections.scm (view raw)
| 1 | ;; extends |
| 2 | |
| 3 | ;; sql |
| 4 | ((call_expression |
| 5 | (selector_expression |
| 6 | field: (field_identifier) @_field |
| 7 | (#any-of? @_field "Exec" "ExecContext" "Query" "QueryContext" "QueryRow" "QueryRowContext")) |
| 8 | (argument_list [(interpreted_string_literal) |
| 9 | (raw_string_literal)] @injection.content)) |
| 10 | (#offset! @injection.content 0 1 0 -1) |
| 11 | (#set! injection.include-children) |
| 12 | (#set! injection.language sql)) |
| 13 | |
| 14 | ([(raw_string_literal) |
| 15 | (interpreted_string_literal)] @injection.content |
| 16 | (#match? @injection.content "--sql" "-- sql" "--SQL" "-- SQL") |
| 17 | (#offset! @injection.content 0 1 0 -1) |
| 18 | (#set! injection.include-children) |
| 19 | (#set! injection.language sql)) |