remove luasnip config file, setup in plugins.init
This commit is contained in:
parent
07d13e67ae
commit
351d1690aa
2 changed files with 21 additions and 12 deletions
|
@ -34,12 +34,27 @@ require('packer').startup(function()
|
||||||
{ 'hrsh7th/cmp-cmdline' },
|
{ 'hrsh7th/cmp-cmdline' },
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
use { 'L3MON4D3/LuaSnip' }
|
use { 'L3MON4D3/LuaSnip',
|
||||||
use { "rafamadriz/friendly-snippets" }
|
config = function ()
|
||||||
use { 'saadparwaiz1/cmp_luasnip' }
|
local snippet_path = os.getenv("HOME") .. "/.config/nvim/snippets/"
|
||||||
use {
|
if not vim.tbl_contains(vim.opt.rtp:get(), snippet_path) then
|
||||||
"benfowler/telescope-luasnip.nvim",
|
vim.opt.rtp:append(snippet_path)
|
||||||
module = "telescope._extensions.luasnip", -- if you wish to lazy-load
|
end
|
||||||
|
|
||||||
|
require("luasnip").config.set_config({
|
||||||
|
history = true,
|
||||||
|
updateevents = "TextChanged,TextChangedI",
|
||||||
|
delete_check_events = "TextChanged,InsertLeave",
|
||||||
|
})
|
||||||
|
require("luasnip.loaders.from_lua").lazy_load()
|
||||||
|
require("luasnip.loaders.from_vscode").lazy_load()
|
||||||
|
require("luasnip.loaders.from_snipmate").lazy_load()
|
||||||
|
end,
|
||||||
|
requires = {
|
||||||
|
{ "rafamadriz/friendly-snippets" },
|
||||||
|
{ 'saadparwaiz1/cmp_luasnip' },
|
||||||
|
{ "benfowler/telescope-luasnip.nvim" },
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Statusbar, colors and syntax
|
-- Statusbar, colors and syntax
|
||||||
|
@ -76,7 +91,6 @@ require('packer').startup(function()
|
||||||
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
require('plugins.luasnip')
|
|
||||||
require('plugins.cmp')
|
require('plugins.cmp')
|
||||||
require('plugins.gitsigns')
|
require('plugins.gitsigns')
|
||||||
require('plugins.neogit')
|
require('plugins.neogit')
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
local languages = {
|
|
||||||
'python',
|
|
||||||
'rust',
|
|
||||||
}
|
|
||||||
require('luasnip.loaders.from_vscode').load({ include = languages }) -- Load only python snippets
|
|
Reference in a new issue