nvim-treesitter/runtime/queries/roto/textobjects.scm
Bendik Samseth fef24d6956
Add Roto to list of supported languages
See https://github.com/NLnetLabs/tree-sitter-roto for the parser repo.

This only works if the filetype for Roto is added explicitly:

```lua
vim.filetype.add({ extension = { roto = "roto" } })
```

After that the queries seem to work well when testing it on all the
example Roto scripts from https://github.com/NLnetLabs/roto/tree/main/examples.

I have a [PR to Vim](https://github.com/vim/vim/pull/19195) aiming to
add `.roto` as a recognized extension for a `roto` filetype. Once there,
NeoVim should eventually pull it in and users will not need to add the
filetype themselves.
2026-01-17 10:14:22 +01:00

18 lines
404 B
Scheme

(function_item
body: (block) @function.inside) @function.around
(filtermap_item
body: (block) @function.inside) @function.around
(test_item
body: (block) @test.inside) @test.around
(record_item
fields: (record_type) @class.inside) @class.around
(variant_item
constructors: (variant_constructors) @class.inside) @class.around
(line_comment) @comment.inside
(line_comment)+ @comment.around