From 8f66129fa4bf6ac10e484c5b3cb92d0cdaf662a8 Mon Sep 17 00:00:00 2001 From: Pratik Tripathy Date: Mon, 6 Jan 2025 17:32:58 +0530 Subject: [PATCH] feat(nvim): Programming QoL plugins - stay-centered: auto center cursor - WIP: project-explorer: open projects from computer from inside neovim --- .../.config/nvim/lua/plugins/code-generic.lua | 2 ++ .../nvim/lua/plugins/utility-plugs.lua | 24 +++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/common/.config/nvim/lua/plugins/code-generic.lua b/common/.config/nvim/lua/plugins/code-generic.lua index 07549cf..15aa47d 100644 --- a/common/.config/nvim/lua/plugins/code-generic.lua +++ b/common/.config/nvim/lua/plugins/code-generic.lua @@ -1,6 +1,8 @@ return { { "tpope/vim-repeat" }, + { "arnamak/stay-centered.nvim" }, + -- Better code folding { "kevinhwang91/nvim-ufo", diff --git a/common/.config/nvim/lua/plugins/utility-plugs.lua b/common/.config/nvim/lua/plugins/utility-plugs.lua index 849fecc..c935617 100644 --- a/common/.config/nvim/lua/plugins/utility-plugs.lua +++ b/common/.config/nvim/lua/plugins/utility-plugs.lua @@ -239,6 +239,30 @@ return { }, }, + { + "Rics-Dev/project-explorer.nvim", + enabled = false, + dependencies = { + "nvim-telescope/telescope.nvim", + }, + opts = { + -- TODO: fix it + command_pattern = "find -L ~/Code -mindepth 1 -maxdepth 3 -type d -name '.git' -printf '%h\n'", + newProjectPath = "~/Code/Dabble/", --custom path for new projects + file_explorer = function(dir) --custom file explorer set by user + vim.cmd("Neotree close") + vim.cmd("Neotree " .. dir) + end, + }, + config = function(_, opts) + require("project_explorer").setup(opts) + end, + keys = { + { "fp", "ProjectExplorer", desc = "Project Explorer" }, + }, + lazy = false, + }, + -- Session management. Saves your session in the background -- TIP: autocmd to autoload sessions at: ../config/autocmd.lua {