From 446d2716e7bb83e58fb516ec27e5c7750069e98c Mon Sep 17 00:00:00 2001 From: Alexander Neonxp Kiryukhin Date: Fri, 2 May 2025 16:05:47 +0300 Subject: =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D1=88=D0=B5=D0=BB=20=D0=BD?= =?UTF-8?q?=D0=B0=20lazy=20nvim,=20=D0=BD=D0=B0=D0=B2=D0=B5=D0=BB=20=D0=BF?= =?UTF-8?q?=D0=BE=D1=80=D1=8F=D0=B4=D0=BE=D0=BA=20=D0=B2=20=D0=BF=D0=BB?= =?UTF-8?q?=D0=B0=D0=B3=D0=B8=D0=BD=D0=B0=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nvim/init.lua | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) (limited to 'nvim/init.lua') diff --git a/nvim/init.lua b/nvim/init.lua index e62059f..2f4316d 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -1,14 +1,23 @@ -local fn = vim.fn -local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim" -if fn.empty(fn.glob(install_path)) > 0 then - packer_bootstrap = - fn.system({ "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path }) +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) vim.g.mapleader = " " vim.g.maplocalleader = " " - -vim.cmd([[packadd packer.nvim]]) +vim.g.colorcolumn = 120 +vim.g.loaded_netrw = 1 +vim.g.loaded_netrwPlugin = 1 require("options") require("plugins") @@ -16,4 +25,4 @@ require("keymaps") require("autocommands") require("lsp") require("dap") -require("colors") +require("onedark").load() -- cgit v1.2.3