The third patch demonstrates how it's possible to close bug#67036 that was impossible to fix without more general changes in treesit.el. The problem is that e.g. Ruby parser to such text: hash[:key] produces such syntax tree: (element_reference object: (identifier) [ (simple_symbol) ]) so when point is on [ then 'M-C-f' can't move to ]. This is fixed now by the third patch: