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

feat(make_entry) allow replacement symbol_type string

Open muemmel opened this issue 2 years ago • 2 comments

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)

muemmel avatar Jul 11 '22 20:07 muemmel

Re-requested after my recent blunder

muemmel avatar Jul 11 '22 20:07 muemmel

Updated to latest upstream state

muemmel avatar Aug 01 '22 21:08 muemmel

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.

Screenshot 2023-07-09 at 9 39 28 PM

with the transformation, it appears as below Screenshot 2023-07-09 at 9 43 07 PM

without the tranformation, the symbol types would appear as below Screenshot 2023-07-09 at 9 50 52 PM

rameshsanth avatar Jul 10 '23 04:07 rameshsanth