mirror of https://github.com/helix-editor/helix
Add textobject for javascript (#3213)
parent
cca83af3fd
commit
681c0a91dc
@ -0,0 +1,36 @@
|
||||
(function_declaration
|
||||
body: (_) @function.inside) @function.around
|
||||
|
||||
(function
|
||||
body: (_) @function.inside) @function.around
|
||||
|
||||
(arrow_function
|
||||
body: (_) @function.inside) @function.around
|
||||
|
||||
(method_definition
|
||||
body: (_) @function.inside) @function.around
|
||||
|
||||
(generator_function_declaration
|
||||
body: (_) @function.inside) @function.around
|
||||
|
||||
(class_declaration
|
||||
body: (class_body) @class.inside) @class.around
|
||||
|
||||
(class
|
||||
(class_body) @class.inside) @class.around
|
||||
|
||||
(export_statement
|
||||
declaration: [
|
||||
(function_declaration) @function.around
|
||||
(class_declaration) @class.around
|
||||
])
|
||||
|
||||
(formal_parameters
|
||||
((_) @parameter.inside . ","? @parameter.around) @parameter.around)
|
||||
|
||||
(arguments
|
||||
((_) @parameter.inside . ","? @parameter.around) @parameter.around)
|
||||
|
||||
(comment) @comment.inside
|
||||
|
||||
(comment)+ @comment.around
|
@ -0,0 +1 @@
|
||||
; inherits: javascript
|
@ -0,0 +1 @@
|
||||
; inherits: typescript
|
@ -0,0 +1 @@
|
||||
; inherits: typescript,jsx
|
@ -0,0 +1,8 @@
|
||||
; inherits: javascript
|
||||
|
||||
[
|
||||
(interface_declaration
|
||||
body:(_) @class.inside)
|
||||
(type_alias_declaration
|
||||
value: (_) @class.inside)
|
||||
] @class.around
|
Loading…
Reference in New Issue