hrsh7th / nvim-cmp

A completion plugin for neovim coded in Lua.
MIT License
8.16k stars 407 forks source link

feat(ghost_text): Added custom multi-line snippets ghost_text support #2001

Open ldfwbebp opened 4 months ago

ldfwbebp commented 4 months ago

I recently started using LazyVim, which utilizes nvim-snippets instead of LuaSnip. As per #1886 and #1955, it's known that current branch doesn't support multi-line ghost_text for LuaSnip custom snippets, so I've added this feature (similar to nvim-snippets in LazyVim). Here's how this feature works.

https://github.com/user-attachments/assets/c073541a-a194-45e7-9847-de1a0bacb397

I'm new to Neovim and Lua, so please let me know if there are any issues. Thank you! @hrsh7th

pidgeon777 commented 3 months ago

Great! Let's hope this will be merged

davidsierradz commented 1 month ago

This doesn't look so good with snippets when the prefix pattern don't match the documentation body, for example markdown snippets:

image

image