ctagsx icon indicating copy to clipboard operation
ctagsx copied to clipboard

Outline view possibility?

Open sogaiu opened this issue 5 years ago • 7 comments

I made a proof-of-concept for providing an outline view via ctagsx and ctagz:

https://github.com/sogaiu/ctagz/tree/tags-for-file https://github.com/sogaiu/ctagsx/tree/outline-view

vscode-fork-of-ctagsx-with-outline-view

Do you have any interest in having this type of functionality?

sogaiu avatar Apr 24 '20 11:04 sogaiu

@sogaiu This adds a Document Symbol Provider. Is there a way to add a Workspace Symbol Provider as well?

Being able to search for symbols acorss entire workspaces would be awesome!

dufferzafar avatar Feb 15 '21 19:02 dufferzafar

@dufferzafar Not sure.

Some possibly relevant bits are:

  • registerWorkspaceSymbolProvider
  • provideWorkspaceSymbols
  • resolveWorkspaceSymbol (may be not necessary?)

These were determined by looking at: https://code.visualstudio.com/api/references/vscode-api

I don't recall having gotten a response from the maintainer about the original issue and IIUC there doesn't appear to be much recent activity. Perhaps this extension is already considered feature-complete by the maintainer?

sogaiu avatar Feb 15 '21 21:02 sogaiu

I mean, the maintainer might consider it feature complete but we know that it isn't.

I don't think you should focus on getting your PR merged. They might not have the time to review etc.

I'll try my hands on the workspace Symbol Provider because I really need that.

Will ask you if I face any problems?

dufferzafar avatar Feb 16 '21 03:02 dufferzafar

I'll consider this, but not with any high priority. The problem with this idea is that you end up having to iterate the whole tags file which is bad for performance, especially when you have large tag files.

jtanx avatar Feb 16 '21 08:02 jtanx

@sogaiu In the outline view, we could also differentiate between a function and a variable.

I guess the ctags file would have this information, right?

dufferzafar avatar Feb 16 '21 08:02 dufferzafar

@jtanx I'm new to ctags, but is there a way to have TWO ctags files - one which is sorted on SYMBOLS and the other that is sorted on FILES.

We could binary search on the appropriate ctags file as per the usecase.

dufferzafar avatar Feb 16 '21 08:02 dufferzafar

not really, and/or if you did it would be nonstandard.

jtanx avatar Feb 16 '21 08:02 jtanx