refactor: moved project to extras

This commit is contained in:
Folke Lemaitre 2023-04-20 08:13:12 +02:00
parent 9b92c63455
commit a8466fb24d
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
3 changed files with 28 additions and 13 deletions

View file

@ -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 = {
{ "<leader>fp", "<Cmd>Telescope projects<CR>", desc = "Projects" },
},
},
},
},
{
"goolord/alpha-nvim",
opts = function(_, dashboard)
local button = dashboard.button("p", "" .. " Projects", ":Telescope projects <CR>")
button.opts.hl = "AlphaButtons"
button.opts.hl_shortcut = "AlphaShortcut"
table.insert(dashboard.section.buttons.val, 4, button)
end,
},
}

View file

@ -261,7 +261,6 @@ return {
dashboard.button("f", "" .. " Find file", ":Telescope find_files <CR>"),
dashboard.button("n", "" .. " New file", ":ene <BAR> startinsert <CR>"),
dashboard.button("r", "" .. " Recent files", ":Telescope oldfiles <CR>"),
dashboard.button("p", "" .. " Projects", ":Telescope projects <CR>"),
dashboard.button("g", "" .. " Find text", ":Telescope live_grep <CR>"),
dashboard.button("c", "" .. " Config", ":e $MYVIMRC <CR>"),
dashboard.button("s", "" .. " Restore Session", [[:lua require("persistence").load() <cr>]]),

View file

@ -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 = {
{ "<leader>fp", "<Cmd>Telescope projects<CR>", desc = "Projects" },
},
}
-- library used by other plugins
{ "nvim-lua/plenary.nvim", lazy = true },