diff options
author | Yigit Sever | 2023-08-18 23:42:39 +0300 |
---|---|---|
committer | Yigit Sever | 2023-08-18 23:42:39 +0300 |
commit | 387e08c52d9752bc839c71119f140ba8435c3d70 (patch) | |
tree | 3bb20c0e58ccf1e65ced4cfdfb6459e226a24672 /.config/nvim/lua/core/lazy.lua | |
parent | 14c14cfcc9aeb4bada6d2429162ded2917f26a94 (diff) | |
download | dotfiles-387e08c52d9752bc839c71119f140ba8435c3d70.tar.gz dotfiles-387e08c52d9752bc839c71119f140ba8435c3d70.tar.bz2 dotfiles-387e08c52d9752bc839c71119f140ba8435c3d70.zip |
nvim: switch to lazy.nvim
revert this as whole, if you miss the good old days
Diffstat (limited to '.config/nvim/lua/core/lazy.lua')
-rw-r--r-- | .config/nvim/lua/core/lazy.lua | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/.config/nvim/lua/core/lazy.lua b/.config/nvim/lua/core/lazy.lua new file mode 100644 index 0000000..8a91029 --- /dev/null +++ b/.config/nvim/lua/core/lazy.lua | |||
@@ -0,0 +1,30 @@ | |||
1 | -- install lazy.nvim if not already installed | ||
2 | local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" | ||
3 | if not vim.loop.fs_stat(lazypath) then | ||
4 | vim.fn.system({ | ||
5 | "git", | ||
6 | "clone", | ||
7 | "--filter=blob:none", | ||
8 | "https://github.com/folke/lazy.nvim.git", | ||
9 | "--branch=stable", -- latest stable release | ||
10 | lazypath, | ||
11 | }) | ||
12 | end | ||
13 | vim.opt.rtp:prepend(lazypath) | ||
14 | |||
15 | -- use a protected call so we don't error out on first use | ||
16 | local ok, lazy = pcall(require, "lazy") | ||
17 | if not ok then | ||
18 | return | ||
19 | end | ||
20 | |||
21 | -- we have to set the leader key here for lazy.nvim to work | ||
22 | require("helpers.keys").set_leader("\\") | ||
23 | |||
24 | -- load plugins from specifications | ||
25 | -- see: https://github.com/folke/lazy.nvim#-structuring-your-plugins | ||
26 | -- we are loading them as a lua module | ||
27 | lazy.setup("plugins") | ||
28 | |||
29 | -- easy-access keybindings | ||
30 | require("helpers.keys").map("n", "<leader>L", lazy.show, "show lazy") | ||