diff --git a/dot_config/nvim/lua/plugins/projects.lua b/dot_config/nvim/lua/plugins/projects.lua new file mode 100644 index 0000000..7418624 --- /dev/null +++ b/dot_config/nvim/lua/plugins/projects.lua @@ -0,0 +1,42 @@ +-- Better project/cd support + +return { + { + "gnikdroy/projections.nvim", + config = function() + require("projections").setup({ + workspaces = { + "~/Projects/Personal", + }, + }) + require("telescope").load_extension("projections") + + -- Load project if started in a project directory + local switcher = require("projections.switcher") + vim.api.nvim_create_autocmd({ "VimEnter" }, { + callback = function() + if vim.fn.argc() == 0 then + switcher.switch(vim.loop.cwd()) + end + end, + }) + end, + keys = { + { "fp", "Telescope projections", desc = "Search projects" }, + }, + }, + { + "nvimdev/dashboard-nvim", + opts = function(_, opts) + local button = { + action = "Telescope projections", + desc = "Projects", + icon = "🕮 ", + key = "p", + } + + button.key_format = " %s" + table.insert(opts.config.center, 6, button) + end, + }, +}