dotfiles/vim/queries/go/textobjects.scm

12 lines
450 B
Scheme
Raw Normal View History

2023-11-23 06:41:55 +00:00
; extends
2021-06-22 04:24:37 +00:00
;; key/value-like types. Works with struct values, struct definitions and parameter value/type pairs:
;;
;; @keyed_element.outer => key and value
;; @keyed_element.inner => value
(keyed_element (_) . (_) @keyed_element.inner) @keyed_element.outer
(field_declaration type: (_) @keyed_element.inner) @keyed_element.outer
(parameter_declaration type: (_) @keyed_element.inner) @keyed_element.outer
2024-05-20 07:04:49 +00:00
(composite_literal (_)) @composite_literal