diff options
-rw-r--r-- | init.lua | 30 | ||||
-rw-r--r-- | lua/core/lazy.lua | 40 |
2 files changed, 42 insertions, 28 deletions
@@ -4,34 +4,8 @@ -- | | | | | | |_ _| | |_| | (_| | -- |_|_| |_|_|\__(_)_|\__,_|\__,_| -- +-- Load Modules {{{ require("core") require("core.langmap") - --- Lazy Plugins Bootstrap {{{ -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "git@github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release - lazypath, - }) -end -vim.opt.rtp:prepend(lazypath) -require("lazy").setup({ - { import = "plugins" }, -- i.e. the lua/plugins directory - -- add more subdirectories as needed -}, { - install = { colorscheme = { "no-clown-fiesta" } }, -}, { - checker = { - enabled = true, - notify = false, - }, - change_detection = { - notify = false, - }, -}) +require("core.lazy") -- }}} diff --git a/lua/core/lazy.lua b/lua/core/lazy.lua new file mode 100644 index 0000000..364be6f --- /dev/null +++ b/lua/core/lazy.lua @@ -0,0 +1,40 @@ +-- _ +-- | | __ _ _____ _ +-- | | / _` |_ / | | | +-- | |__| (_| |/ /| |_| | +-- |_____\__,_/___|\__, | +-- |___/ +-- +-- Bootstrap lazy.nvim {{{ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end +end +vim.opt.rtp:prepend(lazypath) +-- }}} +-- Configure Lazy {{{ +require("lazy").setup({ + { import = "plugins" }, -- i.e. the lua/plugins directory + -- add more subdirectories as needed +}, { + install = { colorscheme = { "no-clown-fiesta" } }, +}, { + checker = { + enabled = true, + notify = false, + }, + change_detection = { + notify = false, + }, +}) +-- }}} |