telescope.nvim
telescope.nvim copied to clipboard
feat(make_entry) allow replacement symbol_type string
Description
Minor change to allow replacing symbol type names (variable, function, etc.) via function. No posted issue addressed, I just like having symbols there for easier recognition.
Wasn't too sure on where you would document this, so I didn't for now.
Type of change
New feature (non-breaking change which adds functionality)
How Has This Been Tested?
Not much to test since it's a simple string replacement.
- [x] Relevant LSP Pickers used with and without config option type_transform
Configuration:
- Neovim version (nvim --version): 0.72
- Operating system and version: Fedora 36
Checklist:
- [x] My code follows the style guidelines of this project (stylua)
- [x] I have performed a self-review of my own code
- [ ] ~~I have commented my code, particularly in hard-to-understand areas~~
- [ ] I have made corresponding changes to the documentation (lua annotations)
Re-requested after my recent blunder
Updated to latest upstream state
Useful feature. Can be used to translate long symbol type names into single character icons and reclaim valuable space for messages. I ended up doing similar except i passed an explicit lookup table to the Telescope and have the function do a lookup into it if its present. I used a new variable, symbol_icons for this purpose. However approach in this PR is much more flexible.
with the transformation, it appears as below
without the tranformation, the symbol types would appear as below