ionide / tree-sitter-fsharp

F# grammar for treesitter
MIT License
81 stars 19 forks source link

feat: basic textobjects #109

Closed tonyjthomas closed 3 weeks ago

tonyjthomas commented 3 weeks ago

Implements a non-exhaustive set of textobjects, most importantly @function.inner and @function.outer.

First time writing treesitter queries, so please let me know if anything can be improved. Hopefully this is a reasonable starting point that others can add to.

Nsidorenco commented 3 weeks ago

Hi @tonyjthomas, Thank you for taking your time creating this!

I am not quite sure if I think this is the best place for these queries, since they are uniquely tailored to a Neovim plugin. Since the tree-sitter parser is editor-agnostic I think it is best to keep the queries to the set of standard captures.

It looks like languages that nvim-treesitter-textobjects support have their queries defined in the nvim-treesitter-textobjects repo itself so I think it would be best to contribute these queries there.

tonyjthomas commented 3 weeks ago

Understood, I'll see about opening a PR there instead. Thanks for the feedback!