1 -- Bootstrap lazy --<--
2 local lazypath
= vim
.fn
.stdpath("data") .. "/lazy/lazy.nvim"
3 -- If not installed get lazy.nvim
4 if not vim
.loop
.fs_stat(lazypath
) then
9 "https://github.com/folke/lazy.nvim.git",
10 "--branch=stable", -- latest stable release
14 local dev_path_file
= vim
.fn
.stdpath("config") .. "/lua/plugins/dev_path.txt"
15 -- Check if the file with custom dev plugins folder path exists
16 if vim
.fn
.filereadable(dev_path_file
) ~= 1 then
17 -- File doesn't exist, ask the user for a path
18 local desired_path
= vim
.fn
.input("Enter the path for custom neovim plugins: ", dev_path_file
)
19 -- Ask for confirmation before writing to the file
20 local confirm
= vim
.fn
.confirm(
21 "Save the path '" .. desired_path
.. "' to " .. dev_path_file
.. "?",
26 -- Write the user's input to the file
27 vim
.fn
.writefile({ desired_path
}, dev_path_file
)
29 print("Plugin path not saved. Using fallback path.")
32 local dev_path
= vim
.fn
.trim(vim
.fn
.readfile(dev_path_file
)[1])
34 vim
.opt
.rtp
:prepend(lazypath
)
35 local lazy
= Prequire("lazy")
36 if not lazy
then return end
39 lazy
.setup("plugins", {
40 defaults
= { lazy
= true },
41 lockfile
= vim
.fn
.stdpath("config") .. "/.lazy-lock.json",
42 git
= { log = { "-5" } }, -- Show the last 5 commits
43 dev
= { path
= dev_path
or "~/projects", fallback
= true },
44 ui
= { border
= "rounded" },
46 colorscheme
= { "rose-pine", "habamax" },
48 change_detection
= { notify
= false },
49 checker
= { enabled
= true },
52 disabled_plugins
= { --<--
68 local lazymap
= MAP("LAZY")
69 lazymap
.nmap("<leader>ll", lazy
.home
, "open [l]azy.nvim")
70 lazymap
.nmap("<leader>lp", lazy
.profile
, "[l]azy [p]rofile")
71 lazymap
.nmap("<leader>lu", lazy
.update
, "[l]azy [u]update")