Subject: bug#75609: Hideshow support for treesitter

From: Juri Linkov <[email-masked]>
Date: Tue, 28 Jan 2025 21:07:46 +0200

close 75609 31.0.50
thanks

>>>> +(defun treesit-hs-inside-comment-p ()
>>>> +  (let ((thing (or (treesit-thing-at (point) "comment")
>>>> +                   (unless (bobp)
>>>> +                     (treesit-thing-at (1- (point)) "comment")))))
>>>> +    (when thing
>>>> +      (list (treesit-node-start thing) (treesit-node-end thing)))))
>>>> +
>>> 
>>> FYI some grammar calls comments line_comment and block_comment.  Maybe
>>> use the comment thing first, and then match “comment” with the node type?
>> 
>> Now this tries to use the comment thing first, and then falls back to “comment”.
>
> FWIW I don’t have other comments :)

Thanks, so now pushed to master and closed.