blob: b4d92aa30aa16fb8fcf487251c7b220023642b38 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
; -----------------------------------------------------------------------------
; General language injection
(quasiquote
(quoter) @injection.language
(quasiquote_body) @injection.content)
((comment) @injection.content
(#set! injection.language "comment"))
; -----------------------------------------------------------------------------
; shakespeare library
; NOTE: doesn't support templating
; TODO: add once CoffeeScript parser is added
; ; CoffeeScript: Text.Coffee
; (quasiquote
; (quoter) @_name
; (#eq? @_name "coffee")
; ((quasiquote_body) @injection.content
; (#set! injection.language "coffeescript")))
; CSS: Text.Cassius, Text.Lucius
(quasiquote
(quoter) @_name
(#any-of? @_name "cassius" "lucius")
(quasiquote_body) @injection.content
(#set! injection.language "css"))
; HTML: Text.Hamlet
(quasiquote
(quoter) @_name
(#any-of? @_name "shamlet" "xshamlet" "hamlet" "xhamlet" "ihamlet")
(quasiquote_body) @injection.content
(#set! injection.language "html"))
; JS: Text.Julius
(quasiquote
(quoter) @_name
(#any-of? @_name "js" "julius")
(quasiquote_body) @injection.content
(#set! injection.language "javascript"))
; TS: Text.TypeScript
(quasiquote
(quoter) @_name
(#any-of? @_name "tsc" "tscJSX")
(quasiquote_body) @injection.content
(#set! injection.language "typescript"))
; -----------------------------------------------------------------------------
; HSX
(quasiquote
(quoter) @_name
(#eq? @_name "hsx")
(quasiquote_body) @injection.content
(#set! injection.language "html"))
; -----------------------------------------------------------------------------
; Inline JSON from aeson
(quasiquote
(quoter) @_name
(#eq? @_name "aesonQQ")
(quasiquote_body) @injection.content
(#set! injection.language "json"))
; -----------------------------------------------------------------------------
; SQL
; postgresql-simple
(quasiquote
(quoter) @injection.language
(#eq? @injection.language "sql")
(quasiquote_body) @injection.content)
(quasiquote
(quoter) @_name
(#any-of? @_name "persistUpperCase" "persistLowerCase" "persistWith")
(quasiquote_body) @injection.content
(#set! injection.language "haskell_persistent"))
; -----------------------------------------------------------------------------
; Python
; inline-python
(quasiquote
(quoter) @_name
(#any-of? @_name "pymain" "pye" "py_" "pyf")
(quasiquote_body) @injection.content
(#set! injection.language "python"))
; -----------------------------------------------------------------------------
; GraphQL
; morpheus-graphql-client
(_
function: (apply
function: (variable) @_name)
argument: (quasiquote
body: (quasiquote_body) @injection.content)
(#set! injection.language "graphql")
(#eq? @_name "declareLocalTypesInline"))
|