anchor finds a good working directory for a file, based on the presence of Makefiles,
.git and other files/directories found in project roots (rootlist).
go get -v git.sr.ht/~skuzzymiglet/anchor
Once installed, anchor.lua can be used to run
anchor inside Neovim. From my
autocmd BufEnter * nnoremap <c-a> :luafile ~/code/anchor/anchor.lua<cr>
Currently, the rootlist is quite short. If you want to add a file to the rootlist, contact me - you don't have to send a patch