telescope.nvim icon indicating copy to clipboard operation
telescope.nvim copied to clipboard

Support for ctags kinds on picker builtin.tags

Open ecerulm opened this issue 1 year ago • 2 comments

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 the tags` 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.

ecerulm avatar Aug 01 '24 21:08 ecerulm

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

jamestrew avatar Aug 02 '24 00:08 jamestrew

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

ecerulm avatar Aug 02 '24 11:08 ecerulm