Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uncommenting friendly-snippets does not work #680

Closed
sqrtnull opened this issue Mar 3, 2024 · 4 comments
Closed

uncommenting friendly-snippets does not work #680

sqrtnull opened this issue Mar 3, 2024 · 4 comments

Comments

@sqrtnull
Copy link

sqrtnull commented Mar 3, 2024

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)

@tjdevries
Copy link
Member

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?

@sqrtnull
Copy link
Author

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)

kickstart.nvim/init.lua

Lines 650 to 654 in b529bc3

config = function()
-- See `:help cmp`
local cmp = require 'cmp'
local luasnip = require 'luasnip'
luasnip.config.setup {}

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

@tjdevries
Copy link
Member

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

@feakuru
Copy link

feakuru commented May 23, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants