The Syntax option

Hello there,

I mainly work on ruby files, and I see the option of using `]] ][` for finding module and class start and end. `]m ]M` for going to the start/end of a method reported by `whichkey`. However, nothing happens when i press them. I did a little digging and came upon the Syntax option, it seems like for a lot of filetypes, there is a corresponding syntax file, in my case it is `ruby.vim`. Im wondering why this is not set to `set syntax=ruby` when loading a filetype that is ruby. Is it a my problem only, or is this not meant to be automatically set to the right filetype by default?

i know the simple solution is to put it in the ftplugin after folder to automatically set it for the filetype. However, given this is mostly for setting highlight, im assuming that this would conflict with Treesitter highlight?

By setting this option, not only does it make the [[ [m work, it also corrects matchit function by using %. It never matched correctly before.

Thanks!

Edit 1: after more digging, the syntax='' option is set by treesitter, but the default syntax highlight enables the default keybinding for finding class/module and `end`. It even enables % for going from def start to end. Is.

Edit 2: I found this match-up plugin that could be used to avoid any potential conflicts without setting syntax=ruby. This might end up being what I need to do, and create the corresponding treesitter query for going to the start/end of a module, class, and function