google / zoekt

Fast trigram based code search
1.67k stars 113 forks source link

Feature: Directory listing #112

Open dobrou opened 4 years ago

dobrou commented 4 years ago

Hi, would it be possible please to add support for directory listing?

My usecase is indexing of local folder without external repository. It means Zoekt links search results to internal file viewer at '/print' route. It would improve useability a lot, if user would be able to navigate from file to parent folder and from folder to other files in it. Also links in search results may point directly to directories on file paths.

I tried to adapt the '/print' route template. But it seems it will require more changes in source code.

Thank you for great app!

robinp commented 2 years ago

Not sure about the intent - to have a filetree in the static Zoekt links served somewhere?

Shameless plug: zoekt-underhood together with underhood exposes a filetree. See https://github.com/TreeTide/zoekt-underhood/blob/main/web/server.go#L72 on how it is stiched together from Zoekt search results, using its golang API.

zoekt-underhood-filetree