diff --git a/lua/lazyvim/plugins/extras/util/project.lua b/lua/lazyvim/plugins/extras/util/project.lua new file mode 100644 index 00000000..18bd7f23 --- /dev/null +++ b/lua/lazyvim/plugins/extras/util/project.lua @@ -0,0 +1,28 @@ +return { + { + "telescope.nvim", + dependencies = { + -- project management + { + "ahmedkhalf/project.nvim", + config = function(_, opts) + require("project_nvim").setup(opts) + require("telescope").load_extension("projects") + end, + keys = { + { "fp", "Telescope projects", desc = "Projects" }, + }, + }, + }, + }, + + { + "goolord/alpha-nvim", + opts = function(_, dashboard) + local button = dashboard.button("p", " " .. " Projects", ":Telescope projects ") + button.opts.hl = "AlphaButtons" + button.opts.hl_shortcut = "AlphaShortcut" + table.insert(dashboard.section.buttons.val, 4, button) + end, + }, +} diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 4cb3bb1b..8d7bd4b7 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -261,7 +261,6 @@ return { dashboard.button("f", " " .. " Find file", ":Telescope find_files "), dashboard.button("n", " " .. " New file", ":ene startinsert "), dashboard.button("r", " " .. " Recent files", ":Telescope oldfiles "), - dashboard.button("p", " " .. " Projects", ":Telescope projects "), dashboard.button("g", " " .. " Find text", ":Telescope live_grep "), dashboard.button("c", " " .. " Config", ":e $MYVIMRC "), dashboard.button("s", " " .. " Restore Session", [[:lua require("persistence").load() ]]), diff --git a/lua/lazyvim/plugins/util.lua b/lua/lazyvim/plugins/util.lua index a5bb572f..16a114bc 100644 --- a/lua/lazyvim/plugins/util.lua +++ b/lua/lazyvim/plugins/util.lua @@ -22,18 +22,6 @@ return { }, }, - -- project management - { - "ahmedkhalf/project.nvim", - config = function(_, opts) - require("project_nvim").setup(opts) - require("telescope").load_extension("projects") - end, - keys = { - { "fp", "Telescope projects", desc = "Projects" }, - }, - } - -- library used by other plugins { "nvim-lua/plenary.nvim", lazy = true },