From: Pranshu Sharma <pranshusharma198@gmail.com>
To: Juri Linkov <juri@linkov.net>, emacs-devel@gnu.org
Subject: Re: hideshow support for treesitter
Date: Thu, 5 Sep 2024 22:33:05 +1000 [thread overview]
Message-ID: <CACKBRF=nZvRkGtb7rALxHF3r_Uc4Pp_XK6KzBoGMtabZxVGYGQ@mail.gmail.com> (raw)
In-Reply-To: <8634mey5us.fsf@mail.linkov.net>
[-- Attachment #1: Type: text/plain, Size: 1160 bytes --]
Is there a preferred way to handle this treesit wise. I know some packages
(eg imenu) require major modes to define their support for it, but others
like ispell do it themselves. I personally thing the latter would be better
in this case.
On Thu, 5 Sept 2024 at 16:36, Juri Linkov <juri@linkov.net> wrote:
> >>> Are there any plans to add treesitter support for hideshow, it seems
> easy
> >>> enough to do and also very helpful, especially for langs that don't
> >>> excessively use parens, such as python
> >>
> >> Indeed, it's easy to do this. You just need to override
> >> hs-find-block-beginning-func, hs-find-next-block-func, etc.
> >> with treesit functions like 'treesit-outline-search'.
> >
> > Ah I see, then I think treesit.el should contain code for this, because
> > this seems extremely useful task that would not make sense if each tree
> > sitter based major mode was to implement this separately
>
> Or hideshow code for treesit could be in hideshow.el as well.
> The reason why 'treesit-outline-search' was added to treesit.el
> was because treesit.el already contained imenu support. But
> imenu support could be in imenu.el as well.
>
[-- Attachment #2: Type: text/html, Size: 1573 bytes --]
next prev parent reply other threads:[~2024-09-05 12:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-04 4:48 hideshow support for treesitter Pranshu Sharma
2024-09-04 16:08 ` Juri Linkov
[not found] ` <CACKBRFm65s1itFf3YAm=yGaxT-11hbPGR_eu9sgVKtQQZE2fKQ@mail.gmail.com>
[not found] ` <8634mey5us.fsf@mail.linkov.net>
2024-09-05 12:33 ` Pranshu Sharma [this message]
2024-09-05 16:42 ` Juri Linkov
2024-09-06 1:18 ` Pranshu Sharma
2024-09-08 3:41 ` Yuan Fu
2024-09-15 14:28 ` pranshu sharma
2024-09-16 4:39 ` Yuan Fu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CACKBRF=nZvRkGtb7rALxHF3r_Uc4Pp_XK6KzBoGMtabZxVGYGQ@mail.gmail.com' \
--to=pranshusharma198@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=juri@linkov.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).