fix : add path for luasnip snippets (#483)
This commit is contained in:
parent
50a5bcc870
commit
8e0dfc1de6
@ -81,6 +81,9 @@ M.plugins = {
|
|||||||
nvimtree = {
|
nvimtree = {
|
||||||
enable_git = 0,
|
enable_git = 0,
|
||||||
},
|
},
|
||||||
|
luasnip = {
|
||||||
|
snippet_path = {},
|
||||||
|
},
|
||||||
statusline = { -- statusline related options
|
statusline = { -- statusline related options
|
||||||
-- these are filetypes, not pattern matched
|
-- these are filetypes, not pattern matched
|
||||||
-- shown filetypes will overrule hidden filetypes
|
-- shown filetypes will overrule hidden filetypes
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
|
local chadrc_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")
|
||||||
local present2, autopairs_completion = pcall(require, "nvim-autopairs.completion.cmp")
|
local present2, autopairs_completion = pcall(require, "nvim-autopairs.completion.cmp")
|
||||||
@ -23,7 +24,7 @@ M.autosave = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
autosave.setup {
|
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",
|
execution_message = "autosaved at : " .. vim.fn.strftime "%H:%M:%S",
|
||||||
events = { "InsertLeave", "TextChanged" },
|
events = { "InsertLeave", "TextChanged" },
|
||||||
conditions = {
|
conditions = {
|
||||||
@ -38,10 +39,9 @@ M.autosave = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
M.better_escape = function()
|
M.better_escape = function()
|
||||||
local config = require("core.utils").load_config()
|
|
||||||
require("better_escape").setup {
|
require("better_escape").setup {
|
||||||
mapping = config.mappings.plugins.better_escape.esc_insertmode,
|
mapping = chadrc_config.mappings.plugins.better_escape.esc_insertmode,
|
||||||
timeout = config.plugins.options.esc_insertmode_timeout,
|
timeout = chadrc_config.plugins.options.esc_insertmode_timeout,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -101,7 +101,7 @@ M.luasnip = function()
|
|||||||
history = true,
|
history = true,
|
||||||
updateevents = "TextChanged,TextChangedI",
|
updateevents = "TextChanged,TextChangedI",
|
||||||
}
|
}
|
||||||
require("luasnip/loaders/from_vscode").load()
|
require("luasnip/loaders/from_vscode").load { path = { chadrc_config.plugins.options.luasnip.snippet_path } }
|
||||||
end
|
end
|
||||||
|
|
||||||
M.neoscroll = function()
|
M.neoscroll = function()
|
||||||
|
Loading…
Reference in New Issue
Block a user