mirror of https://github.com/helix-editor/helix
Update Swift Grammar and Queries (#10802)
parent
44504b720b
commit
aa1630a41a
@ -0,0 +1,6 @@
|
||||
; Upstream: https://github.com/alex-pinkus/tree-sitter-swift/blob/57c1c6d6ffa1c44b330182d41717e6fe37430704/queries/injections.scm
|
||||
|
||||
; Parse regex syntax within regex literals
|
||||
|
||||
((regex_literal) @injection.content
|
||||
(#set! injection.language "regex"))
|
@ -0,0 +1,23 @@
|
||||
(class_declaration
|
||||
body: (_) @class.inside) @class.around
|
||||
|
||||
(protocol_declaration
|
||||
body: (_) @class.inside) @class.around
|
||||
|
||||
(function_declaration
|
||||
body: (_) @function.inside) @function.around
|
||||
|
||||
(parameter
|
||||
(_) @parameter.inside) @parameter.around
|
||||
|
||||
(lambda_parameter
|
||||
(_) @parameter.inside) @parameter.around
|
||||
|
||||
[
|
||||
(comment)
|
||||
(multiline_comment)
|
||||
] @comment.inside
|
||||
|
||||
(comment)+ @comment.around
|
||||
|
||||
(multiline_comment) @comment.around
|
Loading…
Reference in New Issue