summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lua/core/lazy.lua
diff options
context:
space:
mode:
authorYigit Sever2023-08-18 23:42:39 +0300
committerYigit Sever2023-08-18 23:42:39 +0300
commit387e08c52d9752bc839c71119f140ba8435c3d70 (patch)
tree3bb20c0e58ccf1e65ced4cfdfb6459e226a24672 /.config/nvim/lua/core/lazy.lua
parent14c14cfcc9aeb4bada6d2429162ded2917f26a94 (diff)
downloaddotfiles-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.lua30
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
2local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
3if 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 })
12end
13vim.opt.rtp:prepend(lazypath)
14
15-- use a protected call so we don't error out on first use
16local ok, lazy = pcall(require, "lazy")
17if not ok then
18 return
19end
20
21-- we have to set the leader key here for lazy.nvim to work
22require("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
27lazy.setup("plugins")
28
29-- easy-access keybindings
30require("helpers.keys").map("n", "<leader>L", lazy.show, "show lazy")