configs

configs
git clone https://git.prime8.dev/configs.git
Log | Files | Refs | README

init.lua (1123B)


      1 -- This file simply bootstraps the installation of Lazy.nvim and then calls other files for execution
      2 -- This file doesn't necessarily need to be touched, BE CAUTIOUS editing this file and proceed at your own risk.
      3 local lazypath = vim.env.LAZY or vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
      4 
      5 if not (vim.env.LAZY or (vim.uv or vim.loop).fs_stat(lazypath)) then
      6   -- stylua: ignore
      7   local result = vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
      8   if vim.v.shell_error ~= 0 then
      9     -- stylua: ignore
     10     vim.api.nvim_echo({ { ("Error cloning lazy.nvim:\n%s\n"):format(result), "ErrorMsg" }, { "Press any key to exit...", "MoreMsg" } }, true, {})
     11     vim.fn.getchar()
     12     vim.cmd.quit()
     13   end
     14 end
     15 
     16 vim.opt.rtp:prepend(lazypath)
     17 
     18 -- validate that lazy is available
     19 if not pcall(require, "lazy") then
     20   -- stylua: ignore
     21   vim.api.nvim_echo({ { ("Unable to load lazy from: %s\n"):format(lazypath), "ErrorMsg" }, { "Press any key to exit...", "MoreMsg" } }, true, {})
     22   vim.fn.getchar()
     23   vim.cmd.quit()
     24 end
     25 
     26 require "lazy_setup"
     27 require "polish"