New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix issues on updating cwd #596

Closed
wants to merge 1 commit into
base: develop
from

Conversation

Projects
None yet
2 participants
@Mte90

Mte90 commented Sep 12, 2018

Actually if the cwd is changed inside vim, phpactor doesn't care of that.
This fix the issue.

fix issues on updating cwd
Actually if the cwd is changed inside vim, phpactor doesn't care of that.
This fix the issue.

@Mte90 Mte90 referenced this pull request Sep 12, 2018

Closed

WordPress integration #595

@dantleech

This comment has been minimized.

Collaborator

dantleech commented Sep 12, 2018

This is by design. The current assumption (and I appreciate this isn't what everybody does) is that you open VIM for each project. The change you are reverting here means that Phpactor will not stop working if you change directory to, for example, a submodule or a vendor directory in your project (see here and here

The solution would be to automatically detect the root directory of the project, but this is not as easy as it sounds (lots of edge cases), but could be implemented.

@dantleech dantleech closed this Sep 12, 2018

@dantleech

This comment has been minimized.

Collaborator

dantleech commented Sep 12, 2018

But anyway, thanks for the PR but closing this now as this just reverts a fix for other issues. Feel free to create an issue for detecting the project root as I don't think there is one currently.

@Mte90

This comment has been minimized.

Mte90 commented Sep 12, 2018

maybe a solution can be create a command that update the working directory, I am using startify so I use Vim as an IDE to start the project that I need.

@dantleech

This comment has been minimized.

Collaborator

dantleech commented Sep 12, 2018

yeah I don't think there is anything stopping you updating the g:phpactorInitialCwd variable in VIM.

In plugin/phpactor.vim it is set as follows when the plugin is loaded:

let g:phpactorInitialCwd = getcwd()
@dantleech

This comment has been minimized.

Collaborator

dantleech commented Sep 12, 2018

Detecting the project root is certainly a solvable problem though (lots of people have requested it), would be good to implement it in Phpactor, so issue would be good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment