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

uncommenting friendly-snippets does not work

Open sqrtnull opened this issue 2 years ago • 2 comments

Describe the bug

just uncommenting rafamadriz/friendly-snippets does not work

To Reproduce

  1. uncomment rafamadriz/friendly-snippets in the dependencies for nvim-cmp

Desktop

  • OS: macos
  • Terminal: alacritty

Neovim Version

NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1703358377

Fix

add require("luasnip.loaders.from_vscode").lazy_load() when setting up cmp (maybe also add rafamadriz/friendly-snippets to the dependencies for LuaSnip)

sqrtnull avatar Mar 03 '24 12:03 sqrtnull

Yes, you still have to do the setup for friendly snippets -- could maybe be noted better in the documentation though. Do you want to send a PR w/ a description to add?

tjdevries avatar Mar 05 '24 19:03 tjdevries

Since my PR was closed and I don't have any better ideas, here is an explanation on how to solve this for anyone with the same problem. Add the line require("luasnip.loaders.from_vscode").lazy_load() below the following code. (since the old kickstart had the same line here)

https://github.com/nvim-lua/kickstart.nvim/blob/b529bc33590cbb81a5916408b2d6001a643e596c/init.lua#L650-L654

also maybe just read https://github.com/rafamadriz/friendly-snippets

sqrtnull avatar Mar 14 '24 00:03 sqrtnull

@VlaDexa had a really smart suggestion, which we just merged. Should make this easier!

tjdevries avatar Mar 15 '24 14:03 tjdevries

I have a config forked from latest Kickstart (https://github.com/feakuru/nvim-config), and when I try to uncomment the friendly-snippets section there, the snippets for Python, HTML or JS don't seem to show up in completions. Am I missing some additional steps?

feakuru avatar May 23 '24 14:05 feakuru