dotfiles/vim/queries/go/textobjects.scm
Rob Watson 68acd1fcac
All checks were successful
continuous-integration/drone/push Build is passing
fix(nvim): treesitter textobject bindings for Go
2025-01-11 08:38:17 +01:00

18 lines
570 B
Scheme

; extends
;; 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 . ((_) @kv_element.key))
(keyed_element ((_) @kv_element.value) .)
(keyed_element) @kv_element.all
(parameter_declaration) @kv_element.all
(parameter_declaration . ((_) @kv_element.key))
(parameter_declaration ((_) @kv_element.value) .)
(field_declaration) @kv_element.all
(field_declaration . ((_) @kv_element.key))
(field_declaration ((_) @kv_element.value) .)