diff options
| author | leiyu3 <s444814187@gmail.com> | 2026-02-24 15:26:45 -0500 |
|---|---|---|
| committer | leiyu3 <s444814187@gmail.com> | 2026-02-24 15:26:45 -0500 |
| commit | 25bc82f7acde5fe11ee41ed3530607c219083d9a (patch) | |
| tree | 2267899fa85ead83e8cbc14a53621540c6d70d28 /.config/nvim/lua/config | |
| parent | b8fcc11c9b7f77b88e0880ececa735536d938f8d (diff) | |
| download | dotfiles-master.tar.gz dotfiles-master.zip | |
Diffstat (limited to '.config/nvim/lua/config')
| -rw-r--r-- | .config/nvim/lua/config/lazy.lua | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/.config/nvim/lua/config/lazy.lua b/.config/nvim/lua/config/lazy.lua new file mode 100644 index 0000000..f5ee74c --- /dev/null +++ b/.config/nvim/lua/config/lazy.lua | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | -- Bootstrap lazy.nvim | ||
| 2 | local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" | ||
| 3 | if not (vim.uv or vim.loop).fs_stat(lazypath) then | ||
| 4 | local lazyrepo = "https://github.com/folke/lazy.nvim.git" | ||
| 5 | local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) | ||
| 6 | if vim.v.shell_error ~= 0 then | ||
| 7 | vim.api.nvim_echo({ | ||
| 8 | { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, | ||
| 9 | { out, "WarningMsg" }, | ||
| 10 | { "\nPress any key to exit..." }, | ||
| 11 | }, true, {}) | ||
| 12 | vim.fn.getchar() | ||
| 13 | os.exit(1) | ||
| 14 | end | ||
| 15 | end | ||
| 16 | vim.opt.rtp:prepend(lazypath) | ||
| 17 | |||
| 18 | -- Make sure to setup `mapleader` and `maplocalleader` before | ||
| 19 | -- loading lazy.nvim so that mappings are correct. | ||
| 20 | -- This is also a good place to setup other settings (vim.opt) | ||
| 21 | vim.g.mapleader = " " | ||
| 22 | vim.g.maplocalleader = "\\" | ||
| 23 | |||
| 24 | -- Setup lazy.nvim | ||
| 25 | require("lazy").setup({ | ||
| 26 | spec = { | ||
| 27 | -- import your plugins | ||
| 28 | { import = "plugins" }, | ||
| 29 | }, | ||
| 30 | -- Configure any other settings here. See the documentation for more details. | ||
| 31 | -- colorscheme that will be used when installing plugins. | ||
| 32 | install = { colorscheme = { "habamax" } }, | ||
| 33 | -- automatically check for plugin updates | ||
| 34 | checker = { enabled = true }, | ||
| 35 | }) | ||
