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

Getting error while importing the vscode loader with friendly snippets #1073

Closed
PsyNyde opened this issue Dec 2, 2023 · 3 comments
Closed

Comments

@PsyNyde
Copy link

PsyNyde commented Dec 2, 2023

im using this to load the snippets into friendly snippet

require('luasnip.loaders.from_vscode').lazy_load()

but getting this error.

maybe #1033 caused it somehow?

Error:

Failed to run config for friendly-snippets

...cal/share/nvim/lazy/LuaSnip/lua/luasnip/loaders/util.lua:224: attempt to index field 'config' (a nil value)

stacktrace:

  • /LuaSnip/lua/luasnip/loaders/util.lua:224 in get_load_fts
  • /LuaSnip/lua/luasnip/loaders/from_vscode.lua:563 in lazy_load
  • lua/plugins/completions.lua:7 in config
  • lua/plugins/completions.lua:26 in values
@L3MON4D3
Copy link
Owner

L3MON4D3 commented Dec 2, 2023

Oh wow, okay seems like this is run before luasnip proper is even loaded (plugin/luasnip.lua contains a call that populates config)..

Could you show all code responsible for loading luasnip?

@L3MON4D3
Copy link
Owner

L3MON4D3 commented Dec 2, 2023

(Regardless of your setup, I'll look into handling that gracefully, would just like to get a feel for how common this may be)

@L3MON4D3
Copy link
Owner

L3MON4D3 commented Dec 2, 2023

Alright, think that should be fixed, could you try it?

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

2 participants