Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ability to hide symbol type in results or present symbol type as virtual text that is not searchable #3343

Open
srgsanky opened this issue Oct 27, 2024 · 0 comments
Labels
enhancement Enhancement to performance, inner workings or existent features

Comments

@srgsanky
Copy link

Is your feature request related to a problem? Please describe.

When I lookup the document symbols in a markdown file (using marksman lsp), telescope shows all the headings along with the symbol type which is always String. If I have a markdown file say on the topic of Rust and I have a section titled String, I cannot get to it by looking up the document symbols as String matches with the type of all the headings.

I tried setting symbol_type_width=0, but that defaults to 8 when set to 0.

table.insert(display_items, #display_items, { width = opts.symbol_type_width or 8 })

Describe the solution you'd like

Option 1: I need a configuration to hide the symbol type based on filetype.
Option 2: Present the symbol type using virtual text which is not searchable using Telescope.

Describe alternatives you've considered

Currently, I duplicated a set of functions from telescope to overcome this. I use a custom document_symbols (that is mostly a copy from Telescope) and uses a custom entry_maker for markdown files and won't display the symbol type. https://github.com/srgsanky/kickstart.nvim/blob/master/lua/custom/plugins/telescope_custom_document_symbols.lua

Additional context

@srgsanky srgsanky added the enhancement Enhancement to performance, inner workings or existent features label Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement to performance, inner workings or existent features
Projects
None yet
Development

No branches or pull requests

1 participant