* Re: feature/tree-sitter 908aab6144: Improve tree-sitter imenu for c-mode and js-mode
@ 2022-11-13 3:24 Randy Taylor
2022-11-13 3:50 ` Stefan Kangas
0 siblings, 1 reply; 3+ messages in thread
From: Randy Taylor @ 2022-11-13 3:24 UTC (permalink / raw)
To: emacs-devel@gnu.org; +Cc: Yuan Fu
[-- Attachment #1: Type: text/plain, Size: 495 bytes --]
> Instead of a flat list, now categorize imenu entries into categories like "Function", "Variable", "Class", etc.
Can this be made an option? I prefer a flat list.
I don't know how it looked before, but something like:
Struct structName
Field/structName fieldA
Field/structName fieldB
Function func1
Function func2
would be even better (that's what eglot shows on a golang buffer).
BTW, typo on the js change (should be Variable):
> + ("Varieable" . ,(js--treesit-imenu-1 var-tree))
Thanks.
[-- Attachment #2: Type: text/html, Size: 2080 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: feature/tree-sitter 908aab6144: Improve tree-sitter imenu for c-mode and js-mode
2022-11-13 3:24 feature/tree-sitter 908aab6144: Improve tree-sitter imenu for c-mode and js-mode Randy Taylor
@ 2022-11-13 3:50 ` Stefan Kangas
2022-11-13 6:51 ` Yuan Fu
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Kangas @ 2022-11-13 3:50 UTC (permalink / raw)
To: Randy Taylor, emacs-devel@gnu.org; +Cc: Yuan Fu
Randy Taylor <dev@rjt.dev> writes:
>> Instead of a flat list, now categorize imenu entries into categories
>> like "Function", "Variable", "Class", etc.
>
> Can this be made an option? I prefer a flat list.
>
> I don't know how it looked before, but something like:
> Struct structName
> Field/structName fieldA
> Field/structName fieldB
> Function func1
> Function func2
>
> would be even better (that's what eglot shows on a golang buffer).
Me too. Completing over a flat list tends to work much better with the
completion framework I use (ivy).
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: feature/tree-sitter 908aab6144: Improve tree-sitter imenu for c-mode and js-mode
2022-11-13 3:50 ` Stefan Kangas
@ 2022-11-13 6:51 ` Yuan Fu
0 siblings, 0 replies; 3+ messages in thread
From: Yuan Fu @ 2022-11-13 6:51 UTC (permalink / raw)
To: Stefan Kangas; +Cc: Randy Taylor, emacs-devel@gnu.org
> On Nov 12, 2022, at 7:50 PM, Stefan Kangas <stefankangas@gmail.com> wrote:
>
> Randy Taylor <dev@rjt.dev> writes:
>
>>> Instead of a flat list, now categorize imenu entries into categories
>>> like "Function", "Variable", "Class", etc.
>>
>> Can this be made an option? I prefer a flat list.
>>
>> I don't know how it looked before, but something like:
>> Struct structName
>> Field/structName fieldA
>> Field/structName fieldB
>> Function func1
>> Function func2
>>
>> would be even better (that's what eglot shows on a golang buffer).
>
> Me too. Completing over a flat list tends to work much better with the
> completion framework I use (ivy).
I suspect you two are already using a categorized imenu list. The “Struct”, “Function” are actually category labels. I think nowadays every completion framework (ivy, consult) flattens the imenu list.
Yuan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-11-13 6:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-13 3:24 feature/tree-sitter 908aab6144: Improve tree-sitter imenu for c-mode and js-mode Randy Taylor
2022-11-13 3:50 ` Stefan Kangas
2022-11-13 6:51 ` Yuan Fu
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.