require('luasnip.session.snippet_collection').clear_snippets() ls.add_snippets('lua', { s('func', { t 'function() ', i(1), t ' end', }), s('if', { t 'if ', i(1, 'true'), t ' then ', i(2), t ' end', }), }) -- Return false to invalidate cache entry for require() -- This is so sourcing snippets/init.lua also "reloads" this file -- https://stackoverflow.com/questions/72242451/sourcing-nvim-init-does-not-source-required-lua-files return false