diff options
author | Yigit Sever | 2024-10-10 10:00:42 +0200 |
---|---|---|
committer | Yigit Sever | 2024-10-10 10:00:42 +0200 |
commit | b86bb46e1ac60bc97882dba1a7c2bb153f1cdb9d (patch) | |
tree | a528b101d002fe8b2e7f4d5afb18cad3360d269a | |
parent | dab9ab0486e0bb2d2920ee14a9663bf01596ab49 (diff) | |
download | dotfiles-b86bb46e1ac60bc97882dba1a7c2bb153f1cdb9d.tar.gz dotfiles-b86bb46e1ac60bc97882dba1a7c2bb153f1cdb9d.tar.bz2 dotfiles-b86bb46e1ac60bc97882dba1a7c2bb153f1cdb9d.zip |
nvim: update lazy config
-rw-r--r-- | .config/nvim/lua/core/lazy.lua | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/.config/nvim/lua/core/lazy.lua b/.config/nvim/lua/core/lazy.lua index 8a91029..815953f 100644 --- a/.config/nvim/lua/core/lazy.lua +++ b/.config/nvim/lua/core/lazy.lua | |||
@@ -1,14 +1,17 @@ | |||
1 | -- install lazy.nvim if not already installed | 1 | -- install lazy.nvim if not already installed |
2 | local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" | 2 | local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" |
3 | if not vim.loop.fs_stat(lazypath) then | 3 | if not (vim.uv or vim.loop).fs_stat(lazypath) then |
4 | vim.fn.system({ | 4 | local lazyrepo = "https://github.com/folke/lazy.nvim.git" |
5 | "git", | 5 | local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) |
6 | "clone", | 6 | if vim.v.shell_error ~= 0 then |
7 | "--filter=blob:none", | 7 | vim.api.nvim_echo({ |
8 | "https://github.com/folke/lazy.nvim.git", | 8 | { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, |
9 | "--branch=stable", -- latest stable release | 9 | { out, "WarningMsg" }, |
10 | lazypath, | 10 | { "\nPress any key to exit..." }, |
11 | }) | 11 | }, true, {}) |
12 | vim.fn.getchar() | ||
13 | os.exit(1) | ||
14 | end | ||
12 | end | 15 | end |
13 | vim.opt.rtp:prepend(lazypath) | 16 | vim.opt.rtp:prepend(lazypath) |
14 | 17 | ||