Lightweight project navigator with picker
- Autodetect by using lsp and files to save project root dir
- Allow freely renaming projects for easier management
With lazy.nvim
{
"zongben/proot.nvim",
opts = {}
}For users with Telescope installed
require("telescope").load_extension("proot")For users with Snacks installed, proot automatically registers its sources.
The default configuration is as follows
{
detector = {
enable_file_detect = true,
enable_lsp_detect = true,
},
files = { ".git" },
ignore = {
subpath = true, --If you are using monorepo, set to true to ignore subrepos
lsp = nil, -- ignore lsp clients by name e.g. { "pyright", "tsserver" }
},
events = {
-- called when new project is found
detected = function(name, path)
end
-- called when you change the directory
entered = function(name, path)
end
},
}Open picker by calling require("telescope").extensions.proot.open_picker()
Open picker by calling :Proot
In proot picker you can use d to delete project dir and use r to rename project name virtually
I like to close all buffers and restart LSP servers after I switched repositories
events = {
entered = function ()
vim.cmd("bufdo bd")
for _, client in pairs(vim.lsp.get_clients()) do
vim.lsp.stop_client(client)
end
end
}ahmedkhalf/project.nvim - The superior project management solution for neovim.
