CMP Menu Customization #2189
tostrstrudl
started this conversation in
Show and tell
Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Uh oh!
There was an error while loading. Please reload this page.
-
Split "kind" into two fields: kind_icon and kind_menu
Changed "menu" to "source_menu"
Added highlights for all "kinds" and their "kind_menu" column
Modified lspkind.lua to fit the new variable names and to prevent value-passing confusion
Truncated the title shown for "kind" type (probably not in the best way but Lua doesn't have match/case like C)
Had to go into the source code and add a new field, and make necessary adjustments and additions to files in both nvim-cmp and lspkind repos. All in all though, it was very worth it. I can now style and rearrange all four cmp menu items (kind_icon, abbr, source_menu, and kind_menu)!! I'll upload a screenshot so it can be seen some time soon. I'm probably also missing a couple steps that I did, so either way I'll come back to edit this. Just wanted to share!
Beta Was this translation helpful? Give feedback.
All reactions