mirror of
https://github.com/CompeyDev/my-nvim-setup.git
synced 2024-12-12 12:50:37 +00:00
fix(luasnip): switch to using global variables
This commit is contained in:
parent
34628a1789
commit
ce2a5d8596
2 changed files with 1 additions and 6 deletions
|
@ -43,9 +43,6 @@ M.plugins = {
|
|||
lspconfig = {
|
||||
setup_lspconf = "", -- path of lspconfig file
|
||||
},
|
||||
luasnip = {
|
||||
snippet_paths = {""}, -- list of custom snippet locations
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
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")
|
||||
|
@ -113,9 +112,8 @@ M.luasnip = function()
|
|||
|
||||
options = load_override(options, "L3MON4D3/LuaSnip")
|
||||
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({ paths = snippet_paths })
|
||||
require("luasnip.loaders.from_vscode").lazy_load({ paths = vim.g.luasnippets_path or "" })
|
||||
|
||||
vim.api.nvim_create_autocmd("InsertLeave", {
|
||||
callback = function()
|
||||
|
|
Loading…
Reference in a new issue