tree-sitter-ruby icon indicating copy to clipboard operation
tree-sitter-ruby copied to clipboard

Multiline comment using hashtags

Open benortiz opened this issue 2 years ago • 0 comments

Hi all!

This might not be the right place to submit this request, just trying to get my bearings. I'm coming at this as a user of nvim-treesitter-textobjects and I'm not 100% sure where I need to make a change to get the functionality I want.

I want to be able to query a multiline comment that is formatted with hashtags:

##
# This whole thing
# is one comment

On the nvim-treesitter-textobjects side of things, they have a textobjects.scm file that I can add the following line to. When I add this line, the query matches only one line out of the 3 line comment.

(comment) @comment.outer

I've seen talk in this repo about the block comment syntax (=begin/=end) but nothing about multiline with #.

I ended up here because I believe I need to add another definition of comment (or some other change here) and then make a change to nvim-treesitter-textobjects.

benortiz avatar Mar 09 '22 20:03 benortiz