distant.nvim
distant.nvim copied to clipboard
Doesn't work with `impatient.nvim`'s profile enabled
Hi, I've found out that this plugin doesn't work when I enable profiling for impatient.nvim. I've created an issue there already, but thought I'll create one here as well to see if you have any ideas why this is happening. Thanks!
This seems to be an issue happening in that plugin, so I don't have much to add. If line 231 of profile.lua lines up with the source code, then maybe the profile provided as input to setup is nil and thereby failing. It also looks like there's some sort of override of lua's require function taking place, and I don't know how well that works when requiring a shared library (e.g. distant.so).
FYI, there's an unfinished branch of this plugin that is going to remove the shared library in favor of going back to using the distant binary client-side. This will remove the need to load that library anymore, but I don't know if that will fix your compatibility issue with the other plugin.
Thanks for taking a look into this! It may also have something to do with expanding the arguments in the command, since running :lua require'distant.command'.install() seems to work (failing on parsing invalid input), but passing in vim.fn.expand('<args>') produces that error (however it works on its own). Really an interesting bug.
Keen to see the new changes tho!
Just found out this error too. lol
I am affected by this error too
@axieax, @CharlesChiuGit, @OlegGulevskyy, can one of you try out the current v0.2 branch to see if you still have a conflict with impatient? The branch isn't ready for prime time (yet), but how it interacts with distant should be solid and will let us know if this is a v0.1 problem exclusively or something deeper.
Oh, I have removed distant already on my side, I will see if I can try it again some time soon but don't quote me on that. Maybe @axieax and @CharlesChiuGit could still do it though
Same, I've moved to sshfs a while ago, and iirc the last time I checked for this issue with impatient, it was ok.
i end up just install nvim in remote server, will try if i got time :)
I just tried the v0.2 and it doesn't complain the error again. BUT, I still have not made it work. I can use the username(root) and ip to connect to the server and run command there and I also installed the distant on the remote server. I use my nvim with a different user name(not root). And distantlanch command tries to use that username to connect to the server. So I use command "DistantLaunch root@IP" instead of "DisstantLanch IP". It can figure out the right username(which is root) for me, but when I input the password which is right for the root user, but it gives me an error "failed to connect to the server caused by: connection time out (os error 110)" 30 seconds later. I just can not figure out how to fix that. Is there anything I did wrong? BTW: After the distantlanch I have another input, which I do find in your demo video. What is that? How to deal with that?
Closing this issue out since it was resolved in v0.2.
it gives me an error "failed to connect to the server caused by: connection time out (os error 110)" 30 seconds later.
@meicale didn't see your comment until now. The plugin is going through another rewrite for v0.3 (see #96). If you're still getting this issue, my guess is that the server is started on your remote machine, but the port the server is listening on is not accessible from outside that machine, so the plugin is trying to connect over TCP (after sshing into the machine to start the server) and is failing. If you'd rather use ssh and not distant, you can use DistantConnect ssh://root@IP instead of launching a distant server. Otherwise, check if a server is started on your remote machine when you launch. If you see one there, it's probably the port issue I mentioned.