-
Notifications
You must be signed in to change notification settings - Fork 17
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
Update the pwd on each request #22
Conversation
If a DirChanged event were implemented could we avoid doing this on every request? |
@justinmk yeah I think that would be an improvement, although we'd probably have to use something like this as a fallback for older versions. |
@justinmk come to think of it, if DirChanged is in the nvim roadmap, I might just hold off on fixing this until then. Thoughts? |
Sure. Remind me if I forget... |
Will readdress this when DirChanged is implemented. |
@alexgenco |
59225c4
to
c55fb7d
Compare
@justinmk I've been thinking about this one and it doesn't seem as straightforward as I was hoping. The ruby provider host can't hook into the Here is a possible solution to add support to both legacy providers and remote plugins:
Thoughts? Has the python client come across this issue yet? |
And of course there's always the naive approach that fetches |
The python client has the same issue and hasn't addressed it yet.
That was my original line of thought, except I assumed that the host could set this up itself (without specific support added to nvim runtime files) when it is first initialized. Am I missing something?
|
@justinmk that might work, although now I'm running into some other issues, or maybe I'm overthinking it. For example, if you However I don't think there's a way for the Ruby host to determine the directory in this case, unless it can determine which window the current window split from. I would expect the logic to first look at whether the current window has a specified directory, then fallback to the current tabpage, then fallback to the global directory. But that logic doesn't work in this scenario because the last opened window would fall back to the tabpage default, rather than its parent window's. Definitely feels like I'm missing something basic; your help would be appreciated :) |
@alexgenco You're right, the DirChanged event doesn't expose the internal/implicit directory changes, which happen more often than an explicit
One could add a handler for e.g. |
Should be fixed on nvim master. |
Just redid this branch to account for the new
|
Yes. The "scope" is just there in case plugins need it.
Not sure, actually. We could change it if needed (proof-of-concept PR would be a big help). |
Did some investigation, it looks like they are separate processes with independent working dirs, so I think we're good. I should also note this change doesn't add directory tracking for remote plugins, only the legacy provider. I feel like the rplugin API is flexible enough that users can add the autocmd themselves if they need it. I'll merge and cut a release sometime this weekend unless there's more feedback. |
12bb473
to
1e9c4fd
Compare
Attempts to resolve #21.