From cdb5e4ccea8df2448e19539129de9038d24f503f Mon Sep 17 00:00:00 2001 From: rgarber11 Date: Mon, 5 Feb 2024 13:49:19 -0500 Subject: [PATCH] Add Build Step to LuaSnip (#611) --- init.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 7a3d6b41347..5f7469b6db3 100644 --- a/init.lua +++ b/init.lua @@ -100,7 +100,18 @@ require('lazy').setup({ 'hrsh7th/nvim-cmp', dependencies = { -- Snippet Engine & its associated nvim-cmp source - 'L3MON4D3/LuaSnip', + { + 'L3MON4D3/LuaSnip', + 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 then + return + end + return 'make install_jsregexp' + end)(), + }, 'saadparwaiz1/cmp_luasnip', -- Adds LSP completion capabilities