GNU bug report logs - #75609
Hideshow support for treesitter

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Thu, 16 Jan 2025 17:50:01 UTC

Severity: wishlist

Tags: patch

Fixed in version 31.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #39 received at control <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Yuan Fu <casouri <at> gmail.com>
Cc: 75609 <at> debbugs.gnu.org
Subject: Re: bug#75609: Hideshow support for treesitter
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.




This bug report was last modified 163 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.