remove luasnip config file, setup in plugins.init

This commit is contained in:
Vladan Popovic 2024-03-20 02:19:14 +01:00
parent 07d13e67ae
commit 351d1690aa
2 changed files with 21 additions and 12 deletions

View file

@ -34,12 +34,27 @@ require('packer').startup(function()
{ 'hrsh7th/cmp-cmdline' },
}
}
use { 'L3MON4D3/LuaSnip' }
use { "rafamadriz/friendly-snippets" }
use { 'saadparwaiz1/cmp_luasnip' }
use {
"benfowler/telescope-luasnip.nvim",
module = "telescope._extensions.luasnip", -- if you wish to lazy-load
use { 'L3MON4D3/LuaSnip',
config = function ()
local snippet_path = os.getenv("HOME") .. "/.config/nvim/snippets/"
if not vim.tbl_contains(vim.opt.rtp:get(), snippet_path) then
vim.opt.rtp:append(snippet_path)
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
@ -76,7 +91,6 @@ require('packer').startup(function()
end)
require('plugins.luasnip')
require('plugins.cmp')
require('plugins.gitsigns')
require('plugins.neogit')

View file

@ -1,5 +0,0 @@
local languages = {
'python',
'rust',
}
require('luasnip.loaders.from_vscode').load({ include = languages }) -- Load only python snippets