fix(luasnip): switch to using global variables
This commit is contained in:
parent
34628a1789
commit
ce2a5d8596
@ -43,9 +43,6 @@ M.plugins = {
|
|||||||
lspconfig = {
|
lspconfig = {
|
||||||
setup_lspconf = "", -- path of lspconfig file
|
setup_lspconf = "", -- path of lspconfig file
|
||||||
},
|
},
|
||||||
luasnip = {
|
|
||||||
snippet_paths = {""}, -- list of custom snippet locations
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
local load_override = require("core.utils").load_override
|
local load_override = require("core.utils").load_override
|
||||||
local load_config = require("core.utils").load_config
|
|
||||||
|
|
||||||
M.autopairs = function()
|
M.autopairs = function()
|
||||||
local present1, autopairs = pcall(require, "nvim-autopairs")
|
local present1, autopairs = pcall(require, "nvim-autopairs")
|
||||||
@ -113,9 +112,8 @@ M.luasnip = function()
|
|||||||
|
|
||||||
options = load_override(options, "L3MON4D3/LuaSnip")
|
options = load_override(options, "L3MON4D3/LuaSnip")
|
||||||
luasnip.config.set_config(options)
|
luasnip.config.set_config(options)
|
||||||
snippet_paths = load_config().plugins.options.luasnip.snippet_paths
|
|
||||||
require("luasnip.loaders.from_vscode").lazy_load()
|
require("luasnip.loaders.from_vscode").lazy_load()
|
||||||
require("luasnip.loaders.from_vscode").lazy_load({ paths = snippet_paths })
|
require("luasnip.loaders.from_vscode").lazy_load({ paths = vim.g.luasnippets_path or "" })
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("InsertLeave", {
|
vim.api.nvim_create_autocmd("InsertLeave", {
|
||||||
callback = function()
|
callback = function()
|
||||||
|
Loading…
Reference in New Issue
Block a user