nvim-treesitter-textobjects
nvim-treesitter-textobjects copied to clipboard
(comment) for global.
I found that comments in most languages can be queried with (comment),
Although only tested css, javascript, go, php, vue, I believe for comments, mostly the same (comment).
But now if want to add a query for (comment) for each language, you can only modify each file, which is tedious.
Is it possible to add a global filetype so that each language can apply the query inside.
https://github.com/nvim-treesitter/nvim-treesitter-textobjects/blob/e0d2c72894db60001650b36357d3480f17e1c340/queries/javascript/textobjects.scm#L1
As you can see, javascript queries are inherited from other languages. Maybe you can use this to define sets of global queries and inherit them?