diff options
author | Matt Strapp <matt@mattstrapp.net> | 2025-10-22 10:38:57 -0500 |
---|---|---|
committer | Matt Strapp <matt@mattstrapp.net> | 2025-10-22 10:38:57 -0500 |
commit | 113c9ccecbf78ef0389e9377fb5dd13c76e94cc3 (patch) | |
tree | 70fffa886e620843467717ce10e6fa806774c927 /dot_config/nvim/init.lua | |
parent | Remove lazyvim (diff) | |
download | dotfiles-113c9ccecbf78ef0389e9377fb5dd13c76e94cc3.tar dotfiles-113c9ccecbf78ef0389e9377fb5dd13c76e94cc3.tar.gz dotfiles-113c9ccecbf78ef0389e9377fb5dd13c76e94cc3.tar.bz2 dotfiles-113c9ccecbf78ef0389e9377fb5dd13c76e94cc3.tar.lz dotfiles-113c9ccecbf78ef0389e9377fb5dd13c76e94cc3.tar.xz dotfiles-113c9ccecbf78ef0389e9377fb5dd13c76e94cc3.tar.zst dotfiles-113c9ccecbf78ef0389e9377fb5dd13c76e94cc3.zip |
https://github.com/AstroNvim/AstroNvim
Diffstat (limited to '')
-rw-r--r-- | dot_config/nvim/init.lua | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/dot_config/nvim/init.lua b/dot_config/nvim/init.lua new file mode 100644 index 0000000..424e48d --- /dev/null +++ b/dot_config/nvim/init.lua @@ -0,0 +1,27 @@ +-- This file simply bootstraps the installation of Lazy.nvim and then calls other files for execution +-- This file doesn't necessarily need to be touched, BE CAUTIOUS editing this file and proceed at your own risk. +local lazypath = vim.env.LAZY or vim.fn.stdpath "data" .. "/lazy/lazy.nvim" + +if not (vim.env.LAZY or (vim.uv or vim.loop).fs_stat(lazypath)) then + -- stylua: ignore + local result = vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath }) + if vim.v.shell_error ~= 0 then + -- stylua: ignore + vim.api.nvim_echo({ { ("Error cloning lazy.nvim:\n%s\n"):format(result), "ErrorMsg" }, { "Press any key to exit...", "MoreMsg" } }, true, {}) + vim.fn.getchar() + vim.cmd.quit() + end +end + +vim.opt.rtp:prepend(lazypath) + +-- validate that lazy is available +if not pcall(require, "lazy") then + -- stylua: ignore + vim.api.nvim_echo({ { ("Unable to load lazy from: %s\n"):format(lazypath), "ErrorMsg" }, { "Press any key to exit...", "MoreMsg" } }, true, {}) + vim.fn.getchar() + vim.cmd.quit() +end + +require "lazy_setup" +require "polish" |