nvim: show projects list on startup by default. Add C-p for project

list.
This commit is contained in:
Daniel Lundin 2024-09-12 00:13:55 +02:00
parent c0e0e41004
commit b1d5eb1fc3
Signed by: dln
SSH key fingerprint: SHA256:dQy1Xj3UiqJYpKR5ggQ2bxgz4jCH8IF+k3AB8o0kmdI
2 changed files with 15 additions and 20 deletions

View file

@ -22,6 +22,11 @@ return {
end, end,
desc = "VCS Files", desc = "VCS Files",
}, },
{
"<C-p>",
"<cmd>Telescope projects<cr>",
desc = "Projects",
},
}, },
opts = function(_, opts) opts = function(_, opts)
local actions = require("telescope.actions") local actions = require("telescope.actions")

View file

@ -1,25 +1,7 @@
local logo = [[
]]
return { return {
{ {
"nvimdev/dashboard-nvim", "nvimdev/dashboard-nvim",
opts = { enabled = false,
theme = "hyper",
config = {
header = vim.split(string.rep("\n", 8) .. logo, "\n"),
week_header = { enable = false },
packages = { enable = false },
project = { enable = false },
footer = {},
shortcut = {},
},
},
}, },
{ {
@ -126,7 +108,15 @@ return {
}, },
{ {
"ahmedkhalf/project.nvim", "DrKJeff16/project.nvim",
config = function(_, opts)
if vim.fn.argv()[1] == nil then
require("project_nvim").setup(opts) -- Workaround for project.nvim not setting up
vim.schedule(function()
vim.cmd("Telescope projects")
end)
end
end,
opts = { opts = {
exclude_dirs = { exclude_dirs = {
"~/.cargo/*", "~/.cargo/*",