diff options
Diffstat (limited to 'nvim/lua/config/lazy.lua')
| -rw-r--r-- | nvim/lua/config/lazy.lua | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/nvim/lua/config/lazy.lua b/nvim/lua/config/lazy.lua new file mode 100644 index 0000000..c798b9d --- /dev/null +++ b/nvim/lua/config/lazy.lua | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | -- https://lazy.folke.io/installation | ||
| 2 | |||
| 3 | local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" | ||
| 4 | if not (vim.uv or vim.loop).fs_stat(lazypath) then | ||
| 5 | local lazyrepo = "https://github.com/folke/lazy.nvim.git" | ||
| 6 | local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) | ||
| 7 | if vim.v.shell_error ~= 0 then | ||
| 8 | vim.api.nvim_echo({ | ||
| 9 | { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, | ||
| 10 | { out, "WarningMsg" }, | ||
| 11 | { "\nPress any key to exit..." }, | ||
| 12 | }, true, {}) | ||
| 13 | vim.fn.getchar() | ||
| 14 | os.exit(1) | ||
| 15 | end | ||
| 16 | end | ||
| 17 | vim.opt.rtp:prepend(lazypath) | ||
| 18 | |||
| 19 | require("lazy").setup({ | ||
| 20 | spec = { | ||
| 21 | { import = "plugins" }, | ||
| 22 | }, | ||
| 23 | checker = { | ||
| 24 | enabled = true | ||
| 25 | }, | ||
| 26 | rocks = { | ||
| 27 | enabled = false, | ||
| 28 | }, | ||
| 29 | }) | ||
