-
-
Notifications
You must be signed in to change notification settings - Fork 154
[BC] Detection of "root directory" create BC breaks and can't be disabled #985
Description
phpactor/autoload/phpactor.vim
Lines 498 to 504 in 0f6d77f
| let request = { "action": a:action, "parameters": a:arguments } | |
| let l:workspaceDir = s:searchDirectoryUpwardForRootPatterns( | |
| \ fnamemodify(phpactor#_path(), ':h'), | |
| \ g:phpactorProjectRootPatterns, | |
| \ g:phpactorInitialCwd | |
| \) |
That's bad!
I didn't looked too much as #923 because I didn't saw the point, not that there is none but I work with noautochdir and my Vim always start at the root of my project.
But I just updated my work environment to test LSP in real conditions, since yesterday I can't complete classes, import them, etc
We need to be a bit more careful about BC breaks I guess, on develop it's kind of acceptable.
But this will be a MASSIVE change IMO that needs to be clearly mentioned in the changelog.
Even better would be to make it configurable, I wonder if we could look at the autochdir option and disable that improvement if the option is off.
My problem with that right know, is that phpactor behave as if I was in a directory that I'm actually not in!
The worse thing is that I can't actually disable the auto-detection !!!
I need to cheet and add let g:phpactorProjectRootPatterns = [] to my vimrc, but it's really a hack because I don't need anything to be done since the directory will never change.
Now on each RPC request made, the vim plugin will loop over all parent directories of my pwd until it reaches my home directory and then fallback to the value I want from the start.