airblade / vim-rooter

Changes Vim working directory to project root.
MIT License
1.23k stars 72 forks source link

Rooter does not work for criu/go-criu repositories #129

Closed snprajwal closed 2 years ago

snprajwal commented 2 years ago

Rooter fails to set cwd as the root dir for both these repositories:

I am unsure why this is happening, since these are perfectly ordinary git repos, and rooter works for all the other git repos I work with

airblade commented 2 years ago

What is your g:rooter_patterns?

snprajwal commented 2 years ago

@airblade g:rooter_patterns = ['.git', '_darcs', '.hg', '.bzr', '.svn', 'Makefile', 'package.json']

snprajwal commented 2 years ago

Is there a way to set a priority for these patterns? I've noticed that the Makefile in the nested dirs is overriding the .git folder in the root dir, that's probably what's causing it to not set the correct cwd

airblade commented 2 years ago

Just set the variable in your vimrc, e.g. let g:rooter_patterns = ['.git'].