Files
nvim/lua/plugins/snippets.lua

23 lines
737 B
Lua
Raw Normal View History

2025-04-24 11:59:36 +01:00
return {
'L3MON4D3/LuaSnip',
version = '2.*',
build = (function()
-- Build Step is needed for regex support in snippets.
-- This step is not supported in many windows environments.
-- Remove the below condition to re-enable on windows.
if vim.fn.has 'win32' == 1 or vim.fn.executable 'make' == 0 then
return
end
return 'make install_jsregexp'
end)(),
config = function()
2025-08-26 18:23:14 +01:00
local ls = require 'luasnip'
ls.filetype_extend('vue', { 'javascript' })
2025-04-24 11:59:36 +01:00
local snippets_dir = vim.fn.stdpath 'config' .. '/lua/snippets'
2025-08-26 18:23:14 +01:00
require('luasnip.loaders.from_lua').load {
2025-04-24 11:59:36 +01:00
paths = { snippets_dir },
}
end,
opts = {},
}