Remove textobjects module

This commit is contained in:
Stephan Seitz 2020-09-20 23:20:37 +02:00 committed by Stephan Seitz
parent 7f325538cc
commit 3362f45196
16 changed files with 0 additions and 779 deletions

View file

@ -1,50 +0,0 @@
;; function textobject
(function_declaration
body: (block)? @function.inner) @function.outer
;; function literals
(func_literal
(_)? @function.inner) @function.outer
;; method as function textobject
(method_declaration
body: (block)? @function.inner) @function.outer
;; struct and interface declaration as class textobject?
(type_declaration
(type_spec (type_identifier) (struct_type (field_declaration_list (_)?) @class.inner))) @class.outer
(type_declaration
(type_spec (type_identifier) (interface_type (method_spec_list (_)?) @class.inner))) @class.outer
;; struct literals as class textobject
(composite_literal
(type_identifier)?
(struct_type (_))?
(literal_value (_)) @class.inner) @class.outer
;; conditionals
(if_statement
alternative: (_ (_) @conditional.inner)?) @conditional.outer
(if_statement
consequence: (block)? @conditional.inner)
(if_statement
condition: (_) @conditional.inner)
;; loops
(for_statement
body: (block)? @loop.inner) @loop.outer
;; blocks
(_ (block) @block.inner) @block.outer
;; statements
(block (_) @statement.outer)
;; comments
(comment) @comment.outer
;; calls
(call_expression (_)? @call.inner) @call.outer