fix: LuaSnip personal snippets working
This commit is contained in:
parent
e7cddfde33
commit
983705f3b0
1 changed files with 11 additions and 2 deletions
|
@ -15,7 +15,16 @@ return {
|
|||
-- friendly-snippets
|
||||
require('luasnip.loaders.from_vscode').lazy_load()
|
||||
|
||||
-- Personal snippets
|
||||
require('luasnip.loaders.from_lua').load({ path = 'lua/snippets' })
|
||||
-- Personal snippets.
|
||||
local snippets = {}
|
||||
|
||||
local paths = vim.api.nvim_get_runtime_file('lua/snippets', true)
|
||||
for _, path in ipairs(paths) do
|
||||
if string.find(path, '%/nix%/store%/.+') then
|
||||
table.insert(snippets, path)
|
||||
end
|
||||
end
|
||||
|
||||
require('luasnip.loaders.from_lua').load({ paths = snippets })
|
||||
end,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue