root_swapper.nvimThis is a tiny plugin that sets up an autocommand to lcd to detected root directories when switching buffers.
Supports oil.nvim buffers - when navigating directories in oil, your lcd will update to the appropriate project root based on the current directory.
Lazy.nvim minimal installation:
return {
"cosmicbuffalo/root_swapper.nvim",
}
opts = {
root_indicators = { ".git", "Gemfile", "Makefile" } -- An array of filenames indicating root directories
}