You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lots of people have issues where they cd to a directory inside of VIM, but the working directory remains the same.
We should address this either in the VIM plugin or by using a strategy to detect the project root.
original issue below
just updated the development branch. When running phpactor#Status() I get the wrong working dir. My current working dir is where the .phpactor.yml file is. The 'Work dir' is pointing to my other project.
(I changed the foldernames for privacy)
Info
Version: dafc795 (12 hours ago) 657-completion-do-not-suggest-statics-non-statics-659
Work dir: /Users/myhomefolder/Documents/Other/Directory
Diagnostics
[✔] Composer detected - faster class location and more features!
[✔] Git detected - enables faster refactorings in your repository scope!
[✔] XDebug is disabled. XDebug has a negative effect on performance.
Switching to 0.10.0 did not fix it. After fiddling around I can confirm it was related to xolox/vim-session plugin. I changed the session though but the work dir still was wrong. Only closing of the session fixed it. I don't know if this can be usefull for you, if not just close this issue.
yeah this is a known issue for a few people, currenty the working dir is set for the duration of the VIM process. I am open to adding project directory detection if it can be done sensibly.
Just as a suggestion; I use vim-rooter and never had problems with that. Here is my config:
"VIM-ROOTER
"---------------------------------
"what kind of files determine whether a directory is root
Plug 'airblade/vim-rooter'
let g:rooter_patterns = ['.git/','.phpactor.yml']
au BufEnter * Rooter
Activity
dantleech commentedon Dec 4, 2018
The working dir should be based on the folder in which you started VIM, this hasn't changed as far as I'm aware.
Can you confirm this is a regression (e.g. switching to 0.10.0 tag fixes the behavior?)
gvanbeck commentedon Dec 4, 2018
Switching to 0.10.0 did not fix it. After fiddling around I can confirm it was related to xolox/vim-session plugin. I changed the session though but the work dir still was wrong. Only closing of the session fixed it. I don't know if this can be usefull for you, if not just close this issue.
dantleech commentedon Dec 4, 2018
yeah this is a known issue for a few people, currenty the working dir is set for the duration of the VIM process. I am open to adding project directory detection if it can be done sensibly.
[-]working dir points to wrong directory[/-][+]Project Root Detection[/+]fcojavierdomenech commentedon Feb 19, 2019
Just as a suggestion; I use
vim-rooterand never had problems with that. Here is my config:przepompownia commentedon Mar 17, 2020
Please test #923
dantleech commentedon Mar 30, 2020
This has been implemented in develop, closing.