[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: imenu framework
From: |
Heime |
Subject: |
Re: imenu framework |
Date: |
Sun, 28 Jul 2024 17:18:50 +0000 |
On Sunday, July 28th, 2024 at 6:23 PM, Joel Reicher <joel.reicher@gmail.com>
wrote:
> Heime heimeborgia@protonmail.com writes:
>
> > imenu is a framework for mode-specific buffer indexes
> >
> > Does this mean that it can list the function names depending on
> > the programming language mode ?
>
>
> That's what the language mode should provide, yes, but strictly
> speaking it depends on the mode.
>
> Do you have a particular mode in mind? Its code can be examined.
>
> For example, java-ts-mode contains
>
> (setq-local treesit-simple-imenu-settings
> '(("Class" "\\`class_declaration\\\\'" nil nil) ("Interface"
> "\\\\`interface_declaration\\'" nil
> nil)
> ("Enum" "\\`record_declaration\\\\'" nil nil) ("Method"
> "\\\\`method_declaration\\'" nil nil)))
>
> (and then there is glue in the generic treesitter code)
>
> Cheers,
>
> - Joel
Am currently working on elisp code. imenu makes categorisation by variables
etc. Can one remove the categorisation, and make it list only the function
names, or the variables, or the consts ?