Skip to content

vim-rescript change current directory even it's not rescript project #30

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

Closed
wingyplus opened this issue Feb 15, 2021 · 8 comments · Fixed by #32
Closed

vim-rescript change current directory even it's not rescript project #30

wingyplus opened this issue Feb 15, 2021 · 8 comments · Fixed by #32

Comments

@wingyplus
Copy link

I found this bug when I working on another project (such as Go or Elixir). The current working directory was change caused by vim-rescript. The fzf plugin affected also.

I guess that it's because of this line https://github.com/rescript-lang/vim-rescript/blob/master/autoload/rescript.vim#L51. Maybe it should not called lcd when it cannot detect rescript project.

@wingyplus
Copy link
Author

Oh, it's seems dup with #23 ?

@ryyppy
Copy link
Member

ryyppy commented Feb 22, 2021

are you sure this is actually caused by our plugin? The autocommand for updating the environment only triggers when you create / open a new .res, .resi file: https://github.com/rescript-lang/vim-rescript/blob/master/ftplugin/rescript.vim#L17

@amiralies
Copy link
Collaborator

I can confirm this happens for me too. I.e opening a monorepo which contains only scala code.

@ryyppy ryyppy mentioned this issue Feb 22, 2021
@ryyppy
Copy link
Member

ryyppy commented Feb 22, 2021

@amiralies @wingyplus can you please follow the install instructions of #32 and check if this fixes your issue?

@amiralies
Copy link
Collaborator

not heavily tested but works as expected for me 👍

@Dkendal
Copy link

Dkendal commented Mar 9, 2021

Can confirm that this happens to me as well, regardless of where I am in the filesystem

@ryyppy
Copy link
Member

ryyppy commented Mar 9, 2021

@Dkendal can you try the fix posted above and check if it solves the issue on your machine? If I get some more confirmations that this fix works reliably, I will probably just merge and tag a release

@Dkendal
Copy link

Dkendal commented Mar 9, 2021

@ryyppy looks like it works!

@ryyppy ryyppy closed this as completed in #32 Apr 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants