mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 01:16:18 +04:00
Include interpolated SQL strings in Scala injection queries (#9428)
* Change Scala injection queries to include SQL strings * Include block comments in comment injection * Change #match predicate to #any-of Co-authored-by: Kirawi <67773714+kirawi@users.noreply.github.com> --------- Co-authored-by: Kirawi <67773714+kirawi@users.noreply.github.com>
This commit is contained in:
parent
f0be0c6d4a
commit
9978d421fe
@ -1,2 +1,16 @@
|
||||
((comment) @injection.content
|
||||
([(comment) (block_comment)] @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
|
||||
; TODO for some reason multiline string (triple quotes) interpolation works only if it contains interpolated value
|
||||
; Matches these SQL interpolators:
|
||||
; - Doobie: 'sql', 'fr'
|
||||
; - Quill: 'sql', 'infix'
|
||||
; - Slick: 'sql', 'sqlu'
|
||||
(interpolated_string_expression
|
||||
interpolator:
|
||||
((identifier) @interpolator
|
||||
(#any-of? @interpolator "fr" "infix" "sql" "sqlu"))
|
||||
(interpolated_string) @injection.content
|
||||
(#set! injection.language "sql"))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user