does not enter root dir on startup
Martinits opened this issue · 5 comments
It's not working on startup, I have to :Rooter
manually but I didn't set the manual
config item (default to false). I remove all other plugins and it's still not working. I added some prints into the function rooter
and it indeed changes to the correct root dir. Is there any debug method that I can figure out who changes the root dir after this plugin?
And there's a strange thing that although pwd isn't changed to the root dir, when writing files, it will write to the correct root dir.
are you lazy loading the module? for example i personally lazy load the module like this using packer:
use {
'notjedi/nvim-rooter.lua',
event = 'CursorMoved',
config = function()
require('nvim-rooter').setup {
rooter_patterns = { '.git', '.hg', '.svn' },
trigger_patterns = { '*' },
manual = false,
}
end
}
so the plugin only loads when the cursor is moved.
I didn't. It's just
use {
'notjedi/nvim-rooter.lua',
config = function()
require('nvim-rooter').setup {
rooter_patterns = {
'.git',
'.hg',
'.svn',
'Makefile',
'Cargo.toml',
'.gitignore',
'init.lua',
'package.json',
'README.md',
'README.rst',
'README'
},
}
end
}
is :pwd
printing the correct root dir? and how did you determine that it is not automatically changing to the root dir?
Oh, it gets back to normal suddenly. I guess maybe I made some mistakes on the configurarion. Thanks for your reply.