Andrew Radev on Nostr: Example usage in vim-ruby: ...
Example usage in vim-ruby: https://github.com/vim-ruby/vim-ruby/blob/a99282403445ac1d008b51d6edd820d5dc053ecb/indent/ruby.vim#L82-L84
In my own plugins I usually have helper functions: https://github.com/AndrewRadev/splitjoin.vim/blob/9b0c30f61f13ba4800a11107648bdd748ad511ba/autoload/sj.vim#L551-L563
So yeah, there's a way to do it and it's pretty commonly used. It's why some built-in stuff in neovim (e.g. ruby method text objects) doesn't actually work if you turn off the built-in syntax highlighting.
In my own plugins I usually have helper functions: https://github.com/AndrewRadev/splitjoin.vim/blob/9b0c30f61f13ba4800a11107648bdd748ad511ba/autoload/sj.vim#L551-L563
So yeah, there's a way to do it and it's pretty commonly used. It's why some built-in stuff in neovim (e.g. ruby method text objects) doesn't actually work if you turn off the built-in syntax highlighting.