Closed proro485 closed 3 years ago
Do :lcd %:p:h
and then test (this changes neovim's working directory to match the current file)
Thanks, it is working now. Do I have to do this everytime or was it just a one off?
It should not happen normally. If it happens again I'll reopen the issue
Hey @proro485, there is an alternative automatic way which I use, you can also try. make the following change in packer config and install 'ygm2/rooter.nvim'
along with cphelper
use {
'p00f/cphelper.nvim',
requires = {
'nvim-lua/plenary.nvim',
'ygm2/rooter.nvim',
opt = true
}
}
Now just add the following in the init.lua or anywhere else
-- Rooter config
vim.g.rooter_pattern = { 'input1', 'output1' }
If it detected the file input1
or output1
, it will automatically cd into it. Hope it helps :)
:CphTest command is not working and giving the following error.