fix : add path for luasnip snippets (#483)

This commit is contained in:
siduck76 2021-09-26 07:03:00 +05:30
parent 50a5bcc870
commit 8e0dfc1de6
2 changed files with 8 additions and 5 deletions

View File

@ -81,6 +81,9 @@ M.plugins = {
nvimtree = {
enable_git = 0,
},
luasnip = {
snippet_path = {},
},
statusline = { -- statusline related options
-- these are filetypes, not pattern matched
-- shown filetypes will overrule hidden filetypes

View File

@ -1,5 +1,6 @@
local M = {}
local chadrc_config = require("core.utils").load_config()
M.autopairs = function()
local present1, autopairs = pcall(require, "nvim-autopairs")
local present2, autopairs_completion = pcall(require, "nvim-autopairs.completion.cmp")
@ -23,7 +24,7 @@ M.autosave = function()
end
autosave.setup {
enabled = config.plugins.options.autosave, -- takes boolean value from init.lua
enabled = chadrc_config.plugins.options.autosave, -- takes boolean value from init.lua
execution_message = "autosaved at : " .. vim.fn.strftime "%H:%M:%S",
events = { "InsertLeave", "TextChanged" },
conditions = {
@ -38,10 +39,9 @@ M.autosave = function()
end
M.better_escape = function()
local config = require("core.utils").load_config()
require("better_escape").setup {
mapping = config.mappings.plugins.better_escape.esc_insertmode,
timeout = config.plugins.options.esc_insertmode_timeout,
mapping = chadrc_config.mappings.plugins.better_escape.esc_insertmode,
timeout = chadrc_config.plugins.options.esc_insertmode_timeout,
}
end
@ -101,7 +101,7 @@ M.luasnip = function()
history = true,
updateevents = "TextChanged,TextChangedI",
}
require("luasnip/loaders/from_vscode").load()
require("luasnip/loaders/from_vscode").load { path = { chadrc_config.plugins.options.luasnip.snippet_path } }
end
M.neoscroll = function()