nvim-telescope / telescope.nvim

Find, Filter, Preview, Pick. All lua, all the time.
MIT License
15.36k stars 823 forks source link

Support for ctags kinds on picker builtin.tags #3233

Open ecerulm opened 1 month ago

ecerulm commented 1 month ago

Is your feature request related to a problem? Please describe. When I do :Telescope tags I have a hard time figuring out the matching tags, I mean if I search for "parse" I want to see in the picker for each match if it's "parse kind:method" , "Parse kind:class", or "Parse kind:field"

Describe the solution you'd like my ./tags file already contains the 'kinds, I generate thetags` file with

git ls-files .  |  $(brew --prefix universal-ctags)/bin/ctags --fields=+zK -L - -f tags

and the tags file contents are like this

parse   app/src/main/java/com/craftinginterpreters/lox/Parser.java  /^    List<Stmt> parse() {$/;"  kind:method class:Parser

so I would like the picker for tags to show (file, kind, tagname) instead of just showing the (file, tagname)

Describe alternatives you've considered The alternatives is to stop using ctags and use LSP since the pickers for lsp lsp_document_symbol, lsp_workspace_symbols and lsp_dynamic_workspace_symbols how the "symbol type" (which is equivalent to the ctags kind)

But LSP comes with it's own problems and limitations, for example it looks like the java eclipse.jdt.ls/jdtls language server cannot do queries for workspace symbols other that class so I can't search for methods in the whole workspace.

In fact, I was trying ctags as a way to overcome this limitation with jdtls.

Additional context Add any other context or screenshots about the feature request here.

jamestrew commented 1 month ago

Maybe someone how uses tags and the tags pickers can take a look? I fit neither description.

ecerulm commented 1 month ago

I'll try to create a PR this weekend, but just to clarify what I'm after I'm including two screenshots so that it's more clear

I currently have this in a custom picker, which does visualize the kind image

vs the current :Telescope tags which does not

image