feat(luasnip): added snippet_paths option for luasnip
This commit is contained in:
parent
9ccc95ea6c
commit
5a3fcd7326
@ -43,6 +43,9 @@ M.plugins = {
|
||||
lspconfig = {
|
||||
setup_lspconf = "", -- path of lspconfig file
|
||||
},
|
||||
luasnip = {
|
||||
snippet_paths = {""}, -- list of custom snippet locations
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
local M = {}
|
||||
|
||||
local load_override = require("core.utils").load_override
|
||||
local load_config = require("core.utils").load_config
|
||||
|
||||
M.autopairs = function()
|
||||
local present1, autopairs = pcall(require, "nvim-autopairs")
|
||||
@ -112,7 +113,8 @@ M.luasnip = function()
|
||||
|
||||
options = load_override(options, "L3MON4D3/LuaSnip")
|
||||
luasnip.config.set_config(options)
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
snippet_paths = load_config().plugins.options.luasnip.snippet_paths
|
||||
require("luasnip.loaders.from_vscode").lazy_load({ paths = snippet_paths })
|
||||
|
||||
vim.api.nvim_create_autocmd("InsertLeave", {
|
||||
callback = function()
|
||||
|
Loading…
Reference in New Issue
Block a user