diff options
Diffstat (limited to '')
-rw-r--r-- | init.lua | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -4,15 +4,20 @@ a = vim.api g = vim.g c = vim.cmd +-- performance ---------------------------------------------------------------- +vim.loader.enable() + -- main lua files ------------------------------------------------------------- require('bootstrap') require('core.handler') -- call all snippets in the lua/snippets directory ---------------------------- -require('snippet.shorthands') -for _, file in ipairs(vim.fn.readdir(vim.fn.stdpath('config')..'/lua/snippet', - [[v:val =~ '\.lua$']])) do - require('snippet.'..file:gsub('%.lua$', '')) +if pcall(require, "luasnip") then + require('snippet.shorthands') + for _, file in ipairs(vim.fn.readdir(vim.fn.stdpath('config')..'/lua/snippet', + [[v:val =~ '\.lua$']])) do + require('snippet.'..file:gsub('%.lua$', '')) + end end -- call the config manager ---------------------------------------------------- |