amitds1997 / remote-nvim.nvim Goto Github PK
View Code? Open in Web Editor NEWRemote development in Neovim 🔥
License: MIT License
Remote development in Neovim 🔥
License: MIT License
While using this plugin, it would be really nice to be able to copy and paste from the remote nvim session to the host machine's clipboard and vice versa. This works will a normal nvim session, but as soon as I open a remote session I am unable to use the clipboard.
SSH config Include
keyword supports supplying glob wildcard patterns[1]. When doing so, remote-nvim's SSH config parser tries to access a file with the pattern as the name.
1: From ssh_config(5) manual page:
Include
Include the specified configuration file(s). Multiple
pathnames may be specified and each pathname may contain
glob(7) wildcards and, for user configurations, shell-
like ‘~’ references to user home directories. Wildcards
will be expanded and processed in lexical order. Files
without absolute paths are assumed to be in ~/.ssh if
included in a user configuration file or /etc/ssh if
included from the system configuration file. Include
directive may appear inside a Match or Host block to
perform conditional inclusion.
# ~/.ssh/config
Include config.d/*
Resuls in the error:
E5108: Error executing lua: ...mote/lua/remote-nvim/providers/ssh/ssh_config_parser.lua:121: bad argument #1 to 'lines' (config.d/*: No such file or directory)
remote-nvim should include configuration files using the algorithm described in the manual page.
Describe the bug
I installed the plugin and executed RemoteStart
with [email protected]
in the ssh prompt
ERROR Wed 01 Nov 2023 10:12:39 PM +07 .local/share/nvim/lazy/remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:600: 'Get remote OS' failed.
stack traceback:
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:601: in function '_handle_job_completion'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:621: in function 'run_command'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:182: in function '_get_remote_os'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:106: in function '_setup_workspace_variables'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:543: in function <.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:541>
[C]: in function 'pcall'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:439: in function <.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:438>
FAILED JOB OUTPUT (SO FAR)
zsh:1: command not found: [email protected]
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Connect successfully
System Info
Copying the local configuration to the remote can be extremely slow. scp always reuploads everything whereas rsync could only upload files that are missing or changed.
I tried to launch a devcontainer of https://github.com/moby/moby project and attach to it, but failed with error
Error executing luv callback:
vim/_editor.lua:0: E5560: nvim_err_writeln must not be called in a lua loop callback
stack traceback:
[C]: in function 'nvim_err_writeln'
vim/_editor.lua: in function 'notify'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:802: in function <.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:801>
Use the repro.lua to
reproduce the issue.
Dev Containers: Launch current project in devcontainer
Launch local Neovim client?
Connect to my devcontainer.
Your local OS: MacOS Sonoma 14.0
Local Neovim version: NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1713484068
Remote host OS (if applicable): Linux db7593b9ebcf 6.9.6-orbstack-00147-gb0567c7c0069 #1 SMP Sun Jun 23 23:24:08 UTC 2024 aarch64 GNU/Linux
Remote Neovim version (if applicable): 10.0, installed via remote-nvim,
No
Show active running logs when :RemoteStart
is executed and the plugin is trying to connect to a remote machine. This provides active feedback on what is happening.
I'm new to Neovim and Lazy.vim as well. I just installed the plugin and try to run it and was met with this error.
.local/share/nvim/lazy/remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:418: /usr/share/nvim/runtime/lua/vim/ui.lua:50: E5560: vimL function must not be called in a lua loop callback
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Expected to connect to server
System Info
Originally posted by sinkr April 17, 2024
I don't feel like kubectl exec
is too far different from docker exec
, but I may not be understanding how the plugin will work.
Thanks.
Feature | Devcontainer CLI | Devpod CLI |
---|---|---|
Set up a devcontainer | ✅ (using devcontainer up) | ✅ (using devpod up) |
Set up a running container | ✅ (using devcontainer set-up) | ✅ (using devpod up) |
Stop a running dev container | ❌ | ✅ (using devpod stop) |
Port forwarding | ✅ (using devpod ssh) | |
Running manual commands inside the devcontainer | ✅ (using devcontainer exec) | ✅ (using devpod ssh) |
Deleting dev container | ❌ | ✅ (using devpod down) |
After RemoteStart
> Dev Containers: Launch current project in devcontainer
and the Docker image is pulled and built, Testing remote connection
fails with:
Can't open user config file /home/user/.local/share/nvim/remote-nvim.nvim/ssh_config: Permission denied
but I can open this file fine with Neovim. All work is done locally.
Log:
ERROR Mon 27 May 2024 00:30:36 PM EDT /home/user/.local/share/nvim/lazy/remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:972: 'Testing remote connection' failed.
stack traceback:
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:973: in function '_handle_job_completion'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:1016: in function 'run_command'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:142: in function '_setup_workspace_variables'
...vim/lua/remote-nvim/providers/devpod/devpod_provider.lua:88: in function '_setup_workspace_variables'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:871: in function '_launch_neovim'
...vim/lua/remote-nvim/providers/devpod/devpod_provider.lua:189: in function <...vim/lua/remote-nvim/providers/devpod/devpod_provider.lua:177>
[C]: in function 'xpcall'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:758: in function <.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:757>
FAILED JOB OUTPUT (SO FAR)
Can't open user config file /home/user/.local/share/nvim/remote-nvim.nvim/ssh_config: Permission denied
I could easily be mis-configuring something, new to containers and not really a programmer. I just navigate to a repo with a .devcontainer/
and start the project for the first time.
Some remote machines have only old version GLIBC, which doesn't support nvim-0.10.0. I got the following error when deploying to a remote machine which has GLIBC version 0f 2.17.
Searching for free port on the remote machine
Command: /home/users/yufeng.xia/.remote-nvim/nvim-downloads/v0.10.0/bin/nvim -l /home/users/yufeng.xia/.remote-nvim/scripts/free_port_finder.lua
/home/users/yufeng.xia/.remote-nvim/nvim-downloads/v0.10.0/bin/nvim: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /home/users/yufeng.xia/.remote-nvim/nvim-downloads/v0.10.0/bin/nvim)
/home/users/yufeng.xia/.remote-nvim/nvim-downloads/v0.10.0/bin/nvim: /lib64/libm.so.6: version `GLIBC_2.29' not found (required by /home/users/yufeng.xia/.remote-nvim/nvim-downloads/v0.10.0/bin/nvim)
Would it be possible to specify the to-be-installed nvim version on remote machine in the pop-up session? Thanks~
Is your feature request related to a problem? Please describe.
Having a non-standard config path in local machine prevents loading the config on remote. For example, if the path to the config is ~/.config/weird_nvim/
, then after copying the config over, there will be two directories on remote:
~/.remote-nvim/workspaces/[workspace_tag]/.config/weird_nvim/
, this is the copied config folder from local, and~/.remote-nvim/workspaces/[workspace_tag]/.config/nvim/
, this is the empty default config folder. Remote-nvim will load from this instead of the other folder.Describe the solution you'd like
Specifying with remote config folder to load. This is similar to NVIM_APPNAME
. For example,
copy_dirs = {
config = {
base = vim.fn.stdpath("config"),
dirs = "*",
nvim_appname = "weird_nvim",
}
}
Reading the readme and trying the plugin, it looks to me it's doing something very similar to ssh into the remote server and then running nvim as usual.
Can you expand on the benefits of this plugin? Maybe in the readme?
Thanks!
f
If the .ssh/config
file includes global options like the following:
AddKeysToAgent yes
IdentitiesOnly yes
Host <examplehost1>
HostName <examplehostname1>
Port 22
User <exampleuser>
...
the ssh_config_parser.lua invoked by the RemoteStart
command fails with the following output:
E5108: Error executing lua: ...nvim/lua/remote-nvim/providers/ssh/ssh_config_parser.lua:51: attempt to index a nil value
stack traceback:
...nvim/lua/remote-nvim/providers/ssh/ssh_config_parser.lua:51: in function 'parse_config_file'
...nvim/lua/remote-nvim/providers/ssh/ssh_config_parser.lua:67: in function 'parse_ssh_configs'
...vim/lua/telescope/_extensions/choices/ssh/known_host.lua:28: in function 'action'
...mote-nvim.nvim/lua/telescope/_extensions/remote-nvim.lua:53: in function 'run_replace_or_original'
...re/nvim/lazy/telescope.nvim/lua/telescope/actions/mt.lua:65: in function 'key_func'
...hare/nvim/lazy/telescope.nvim/lua/telescope/mappings.lua:253: in function <...hare/nvim/lazy/telescope.nvim/lua/telescope/mapping
s.lua:252>
Fix: Deleting the global options, fixes the error. I assume the parser does not handle the global options correctly.
This issue tracks pending feature requests yet to be implemented in the plugin. Creating this single issue to keep track of all pending feature requests and for a comprehensive view on what features do plugin users find helpful. Use this issue for discussion or create a discussion for longer discussion. If a feature seems useful, it will be updated in this description box.
Is your feature request related to a problem? Please describe.
Yes. Right now whenever I try to ssh into any host using a protected private key from my local machine, remote-nvim.nvim doesn't let me input the passphrase.
Describe the solution you'd like
I would love if it let me enter the passphrase like it let's me enter the normal password.
Is your feature request related to a problem? Please describe.
As a developer, I would like remote-nvim.nvim to support FreeBSD as a remote operating system, so that I can edit files (and develop plugins) on my OPNSense firewall.
Describe the solution you'd like
Add support for the FreeBSD operating system as a remote endpoint.
Describe alternatives you've considered
I attempted selecting Linux and macOS when connecting. Both failed.
Additional context
Log Output
ERROR Fri Jan 12 09:32:30 2024 /Users/<snip>/.local/Cellar/neovim/HEAD-677e02b/share/nvim/plugged/remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:600: 'Install Neovim if not exists' failed.
stack traceback:
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:601: in function '_handle_job_completion'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:621: in function 'run_command'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:372: in function '_setup_remote'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:544: in function <.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:541>
[C]: in function 'pcall'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:439: in function <.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:438>
FAILED JOB OUTPUT (SO FAR)
Unsupported operating system: FreeBSD
Describe the bug
Run 'RemoteStart' and everything works well, but after Start Local Client, A float window and show up and disappear, then nothing changed.
I can run 'RemoteSessionInfo' to check the remote servers info, it looks well, but I can't connect it using :RemoteStart
To Reproduce
Steps to reproduce the behavior:
Expected behavior
After I chose Start Local Client, I should connect the remote nvim.
System Info
Additional context
Should I open the firewall port? But afaik, the port is dynamic in different sessions.
I have installed the plugin with lazy following the instructions in the README and it shows as installed. However if I do :RemoteStart, it is not available.
I was expecting to work when I write the command :RemoteStart.
Did I miss anything in the configuration? I have only copied this:
{
"amitds1997/remote-nvim.nvim",
version = "v0.2.2", -- Pin to GitHub releases
dependencies = {
"nvim-lua/plenary.nvim", -- For standard functions
"MunifTanjim/nui.nvim", -- To build the plugin UI
"nvim-telescope/telescope.nvim", -- For picking b/w different remote methods
},
config = true,
}
and added to the file lua/custom/plugins.lua where there are all my other plugins (see screenshot).
At first, thank you for your great plugin that makes remote development easier and with more fun!
But something frustrates me that recently I have ssh-ed into a remote server from a VPS vendor with remote-nvim, unluckily remote-nvim failed to create neovim directories. After reading the log, I found the reason is that home directory is not identified correctly. Although the echo command itself is executed without errors, a warning message from bash is emitted into stderr, and remote-nvim takes all of them as the 'home directory'. The full output is like
/home/myuser
bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
Please also take a look at the screenshot below.
It's easy to reproduce by echoing some warning message to stderr, in your remote .bashrc
.
With some investigation, I have found the following line contributes to this issue. I'm not sure if the option pty = true
is required, but mixing the output of stdout and stderr and using it as command's return value in my opinion is somewhat fragile, which is roughly equivalent to assuming that stderr will always be empty as long as the exit code is 0.
https://github.com/amitds1997/remote-nvim.nvim/blob/main/lua/remote-nvim/providers/executor.lua#L79
Describe the bug
"Find free port on remote running"
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Go forward in the setup process
System Info
When trying to connect to a remote machine like a raspberry pi, neovim app image installation fails due to it being an ARM platform
I tried running a docker image as a devcontainer using mcr.microsoft.com/devcontainers/python (but it does the same with other devcontainers images), after selecting the neovim version v0.10.0 I get the following error: /home/vscode/.remote-nvim/scripts/neovim_install.sh: line 97: /tmp/tmp.c85bjHajYI/nvim-v0.10.0-linux.appimage: cannot execute: required file not found
Steps to reproduce the behavior:
Remote Docker: Launch docker image
mcr.microsoft.com/devcontainers/python
A clear and concise description of what you expected to happen.
FAILED JOB OUTPUT (SO FAR)
Downloading Neovim...
Download completed.
Extracting Neovim binary...
/home/vscode/.remote-nvim/scripts/neovim_install.sh: line 97: /tmp/tmp.c85bjHajYI/nvim-v0.10.0-linux.appimage: cannot execute: required file not found
ERROR mer. 10 juil. 2024 13:52:29 .local/share/nvim/lazy/remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:973: 'Installing Neovim (if required)' failed.
stack traceback:
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:974: in function '_handle_job_completion'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:1017: in function 'run_command'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:645: in function '_setup_remote'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:873: in function '_launch_neovim'
...vim/lua/remote-nvim/providers/devpod/devpod_provider.lua:189: in function <...vim/lua/remote-nvim/providers/devpod/devpod_provider.lua:177>
[C]: in function 'xpcall'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:759: in function <.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:758>
The plugin is struggling to find the linux appimage when following the same process shown in the project demo for attaching to an existing devpod workspace.
Steps to reproduce the behavior:
devpod up github.com/microsoft/vscode-remote-try-node --ide None
vscode-remote-try-node
with RemoteStart
commandExtracting Neovim binary...
Launch Neovim (Run no. 1) (no longer active)
Setting up devcontainer workspace
Command: devpod up --open-ide=false --configure-ssh=true --ide=none --ssh-config=/home/bebr/.local/share/nvim/remote-nvim.nvim/ssh_config --log-output=raw vscode-remote-try-node --id vscode-remote-try-node
Workspace vscode-remote-try-node already exists
Creating devcontainer...
Setup container...
Run 'ssh vscode-remote-try-node.devpod' to ssh into the devcontainer
Testing remote connection
Command: echo 'Hello'
Hello
Determining OS on remote machine
Command: uname -s -m
Linux x86_64
Checking if Neovim is installed system-wide on remote
Command: nvim --version || true
bash: line 1: nvim: command not found
Choice: Choose Neovim version to install
Choice selected: v0.10.0
Determining remote user's home directory
Command: echo $HOME
/home/node
Creating custom neovim directories on remote
Command: mkdir -p /home/node/.remote-nvim/scripts && mkdir -p /home/node/.remote-nvim/workspaces/jeB0nKDQSw/.config/nvim && mkdir -p /home/node/.remote-nvim/workspaces/jeB0nKDQSw/.cache/nvim && mkdir -p /home/node/.remote-nvim/workspaces/jeB0nKDQSw/.local/state/nvim && mkdir -p /home/node/.remote-nvim/workspaces/jeB0nKDQSw/.local/share/nvim && mkdir -p /home/node/.remote-nvim/nvim-downloads/v0.10.0
Copying plugin scripts onto remote
Command: COPY /home/bebr/.local/share/nvim/lazy/remote-nvim.nvim/scripts -> /home/node/.remote-nvim
free_port_finder.lua 0% 0 0.0KB/s --:-- ETA
free_port_finder.lua 100% 216 995.4KB/s 00:00
neovim_download.sh 0% 0 0.0KB/s --:-- ETA
neovim_download.sh 100% 4175 13.7MB/s 00:00
neovim_install.sh 0% 0 0.0KB/s --:-- ETA
neovim_install.sh 100% 7088 25.9MB/s 00:00
Installing Neovim (if required)
Command: chmod +x /home/node/.remote-nvim/scripts/neovim_download.sh && chmod +x /home/node/.remote-nvim/scripts/neovim_install.sh && /home/node/.remote-nvim/scripts/neovim_install.sh -v v0.10.0 -d /home/node/.remote-nvim -m binary -a x86_64
Downloading Neovim...
Download completed.
Extracting Neovim binary...
/home/node/.remote-nvim/scripts/neovim_install.sh: line 97: /tmp/tmp.Hu3vgUFWDo/nvim-v0.10.0-linux.appimage: No such file or directory
Just like the demos show, the plugin should successfully attach to
If applicable, add screenshots to help explain your problem.
EndeavourOS - Arch distro
0.10.0
vscode-remote-try-node.devpod
0.10.0
Add any other context about the problem here.
Healthcheck passes for the plugin:
==============================================================================
remote-nvim: require("remote-nvim.health").check()
remote-nvim.nvim ~
- OK curl: `curl 8.7.1 (x86_64-pc-linux-gnu) libcurl/8.7.1 OpenSSL/3.3.0 zlib/1.3.1 brotli/1.1.0 zstd/1.5.5 libidn2/2.3.7 libpsl/0.21.5 libssh2/1.11.0 nghttp2/1.62.1 nghttp3/1.3.0`
- OK tar: `tar (GNU tar) 1.35`
- OK ssh: `OpenSSH_9.7p1, OpenSSL 3.3.0 9 Apr 2024`
- OK devpod: `v0.5.7`
- OK docker: `Docker version 26.1.3, build b72abbb6f0`
and I can successfully vs code to the same instance if I run with vscode ide.
Neovim installed from arch extra sources:
❯ nvim -V1 -v
NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1713773202
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/share/nvim"
Run :checkhealth for more info
1 extra/neovim 0.10.0-2 (6.9 MiB 28.5 MiB) (Installed)
Fork of Vim aiming to improve user experience, plugins, and GUIs
When trying to launch a devcontainer using devpod on local docker provider under NixOS, everything works great until it tries to run:
Command: chmod +x /home/vscode/.remote-nvim/scripts/neovim_download.sh && chmod +x /home/vscode/.remote-nvim/scripts/neovim_utils.sh && chmod +x /home/vscode/.remote-nvim/scripts/neovim_install.sh && /home/vscode/.remote-nvim/scripts/neovim_install.sh -v v0.10.0 -d /home/vscode/.remote-nvim -m binary -a x86_64
At this point it fails with
bash: line 1: /home/vscode/.remote-nvim/scripts/neovim_install.sh: cannot execute: required file not found
From what I can guess, since my devcontainer doesn't have nix or NixOS installed, but is an unbuntu container, the script is getting incorrectly mangled or something. The first line of the script comes out to be:
#!/nix/store/agkxax48k35wdmkhmmija2i2sxg8i7ny-bash-5.2p26/bin/bash
Steps to reproduce the behavior:
flake.nix
, built into a nix vim plugin in neovim-overlay.nix
, and instantiated under nvim/plugin/remote-nvim.luaShould install nvim on remote and connect to it.
I think maybe the nix vim plugin maker might be mangling the script, expecting to make it work on a nix install rather than anything else.
I came across the above problem while trying to debug my main machine which fails on the echo 'Hello'
check with the following output:
DEBUG Wed 10 Jul 2024 13:19:24 BST /nix/store/8qvna5qxr8yil5l53lchi9db9r7frfb7-vim-pack-dir/pack/myNeovimPackages/start/remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:866: [ssh][ubuntu-container] Starting remote neovim launch
DEBUG Wed 10 Jul 2024 13:19:24 BST /nix/store/8qvna5qxr8yil5l53lchi9db9r7frfb7-vim-pack-dir/pack/myNeovimPackages/start/remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:141: Did not find any existing configuration. Creating one now..
DEBUG Wed 10 Jul 2024 13:19:24 BST /nix/store/8qvna5qxr8yil5l53lchi9db9r7frfb7-vim-pack-dir/pack/myNeovimPackages/start/remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:995: ["ssh"]["ubuntu-container"] Running "echo 'Hello'"
DEBUG Wed 10 Jul 2024 13:19:25 BST /nix/store/8qvna5qxr8yil5l53lchi9db9r7frfb7-vim-pack-dir/pack/myNeovimPackages/start/remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:1015: ["ssh"]["ubuntu-container"] Running "echo 'Hello'" completed
ERROR Wed 10 Jul 2024 13:19:25 BST /nix/store/8qvna5qxr8yil5l53lchi9db9r7frfb7-vim-pack-dir/pack/myNeovimPackages/start/remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:973: 'Testing remote connection' failed.
stack traceback:
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:974: in function '_handle_job_completion'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:1017: in function 'run_command'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:142: in function '_setup_workspace_variables'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:872: in function '_launch_neovim'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:883: in function <.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:882>
[C]: in function 'xpcall'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:759: in function <.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:758>
FAILED JOB OUTPUT (SO FAR)
bash: -c: line 1: unexpected EOF while looking for matching `''
bash: -c: line 2: syntax error: unexpected end of file
Which uses OpenSSH_9.8, but since I am going from a NixOS machine to a docker container, there are more than a few moving parts to investigate along the lines of #150 before I feel comfortable opening a new issue. If you have any ideas what might be causing this please let me know!
Originally posted by @TakodaS in #147 (comment)
I noticed that after the client startup, it stay in TERMINAL mode.
If I input C-\ C-n to exit terminal mode, it backs to the local nvim thread context which makes it is hard to used it
how to make the clent works like create an new nvim thread context
Can we open new terminal or window directly like remote-ssh's behavior on vscode
Many of us use git to manage our nvim configs, and copying the .git
directory over to the remote host seems in most, if not all, cases unnecessary and slow. It might be a good idea to avoid copying it altogether.
Is your feature request related to a problem? Please describe.
I am trying to use this plugin for connecting to a computing cluster which does not have the latest software. Specifically, is has GLIBC version 2.17, which makes the install crash when trying to execute "free_port_finder.lua" with the following error (replaced specific user directory with dots for privacy reasons):
Command: .../.remote-nvim/nvim-downloads/v0.10.0/bin/nvim -l .../.remote-nvim/scripts/free_port_finder.lua
.../.remote-nvim/nvim-downloads/v0.10.0/bin/nvim: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by .../.remote-nvim/nvim-downloads/v0.10.0/bin/nvim)
.../.remote-nvim/nvim-downloads/v0.10.0/bin/nvim: /lib64/libm.so.6: version `GLIBC_2.29' not found (required by .../.remote-nvim/nvim-downloads/v0.10.0/bin/nvim)
Also, for security reasons most ports are blocked on the cluster. I can open an SSH tunnel on a specific port, so ideally I would use that one for the remote session.
Describe the solution you'd like
A way to skip this step and just choose a specific port.
Describe alternatives you've considered
I have tried to install a higher version of GLIBC, but this requires (amongst other things) a newer version of make, and without admin rights this is quite the hassle.
nvim-notify
is no longer the right solution to provide status updates. With integration of devcontainers
and option to build Neovim, some operations might take a lot of time so we cannot provide timely updates using nvim-notify
anymore. So, we would build a custom window using nui.nvim
instead to get around this.
From #63
Here is the contents of the log (I've replaced some identifiable information with |domain|
|username|
and |hostname|
)
Some additional information: I'm on Windows (powershell) using password auth
ERROR 11/1/2023 12:09:06 PM C:/Users/NoodleBug/AppData/Local/nvim-data/lazy/remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:600: 'Get remote OS' failed.
stack traceback:
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:601: in function '_handle_job_completion'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:621: in function 'run_command'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:182: in function '_get_remote_os'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:106: in function '_setup_workspace_variables'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:543: in function <.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:541>
[C]: in function 'pcall'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:439: in function <.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:438>
FAILED JOB OUTPUT (SO FAR)
�[?25l�[2J�[m�[H|username|@|hostname|'s password:�[1C�]0;C:\WINDOWS\SYSTEM32\cmd.exe��[?25h
|username|@|hostname| : The term '|username|@|hostname|' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name, or if a path was
included, verify that the path is correct and try again.
At line:1 char:1
+ |username|@|hostname| uname
+ ~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (|username|@|hostname|:String) [], CommandNotFoundExc
eption
+ FullyQualifiedErrorId : CommandNotFoundException
ERROR 11/2/2023 11:36:56 AM AppData\Local\nvim-data\lazy\remote-nvim.nvim\lua\remote-nvim\providers\provider.lua:600: 'Get remote OS' failed.
stack traceback:
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:601: in function '_handle_job_completion'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:621: in function 'run_command'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:182: in function '_get_remote_os'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:106: in function '_setup_workspace_variables'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:543: in function <.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:541>
[C]: in function 'pcall'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:439: in function <.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:438>
FAILED JOB OUTPUT (SO FAR)
�[?25l�[2J�[m�[H|username|@|hostname|'s password:�[1C�]0;C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe��[?25h
|username|@|hostname| : The term '|username|@|hostname|' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name, or if a path was
included, verify that the path is correct and try again.
At line:1 char:1
+ |username|@|hostname| uname
+ ~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (|username|@|hostname|:String) [], CommandNotFoundExc
eption
+ FullyQualifiedErrorId : CommandNotFoundException
ERROR 11/3/2023 11:44:55 AM C:/Users/NoodleBug/AppData/Local/nvim-data/lazy/remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:600: 'Get remote OS' failed.
stack traceback:
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:601: in function '_handle_job_completion'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:621: in function 'run_command'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:182: in function '_get_remote_os'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:106: in function '_setup_workspace_variables'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:543: in function <.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:541>
[C]: in function 'pcall'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:439: in function <.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:438>
FAILED JOB OUTPUT (SO FAR)
�[?25l�[2J�[m�[H|username|@|hostname|'s password:�[1C�]0;C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe��[?25h
uname : The term 'uname' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path
is correct and try again.
At line:1 char:1
+ uname
+ ~~~~~
+ CategoryInfo : ObjectNotFound: (uname:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
ERROR 11/3/2023 11:45:28 AM C:/Users/NoodleBug/AppData/Local/nvim-data/lazy/remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:600: 'Get remote OS' failed.
stack traceback:
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:601: in function '_handle_job_completion'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:621: in function 'run_command'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:182: in function '_get_remote_os'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:106: in function '_setup_workspace_variables'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:543: in function <.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:541>
[C]: in function 'pcall'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:439: in function <.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:438>
FAILED JOB OUTPUT (SO FAR)
�[?25l�[2J�[m�[H|domain|/|username|@|hostname|'s password:�[1C�]0;C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe��[?25h
uname : The term 'uname' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path
is correct and try again.
At line:1 char:1
+ uname
+ ~~~~~
+ CategoryInfo : ObjectNotFound: (uname:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Originally posted by @Noodle-Bug in #63 (comment)
This seems like a very cool tool. When I follow the guide (or the video) I end up here:
It is just hanging, and does not present the next step. I copied the config from the README, but removed the lines with util
since they are not specified anywhere (what is util
?).
For the servers I work on I use SSH keys.
Any help troubleshooting this is highly appreciated.
Just trying out your plugin and ran into this error.
"tar: unrecognized option '--disable-copyfile'"
I'm on Linux and not sure if this is BSD specific, but currently makes using compression to copy things unusable.
Removed the reference in this file lua/remote-nvim/providers/ssh/ssh_executor.lua
Now it works.
Hi, great work on the plugin, but i can't figure out how to connect to my host
I'm using LazyVim distro with the default remote-nvim.nvim settings:
return {
"amitds1997/remote-nvim.nvim",
tag = "v0.0.1",
dependencies = {
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
"rcarriga/nvim-notify",
"nvim-telescope/telescope.nvim",
},
config = true,
}
But the plugin is stuck on the message: Running installation script... completed
and nothing happens. Looking at ~/.remote-nvim i get:
~$ tree -d .remote-nvim/workspaces/HUza2WYq5Q/
.remote-nvim/workspaces/HUza2WYq5Q/
0 directories
Meaning the session dir is empty.
Checking the RemoteLog I get:
[ERROR Sat Mar 2 20:16:45 2024] ~/.local/share/LazyVim/lazy/remote-nvim.nvim/lua/remote-nvim/providers/ssh/ssh_provider.lua:630: "ssh -p 22 user_name@<host ip addr> 'chmod +x ~/.remote-nvim/scripts/neovim_install.sh && ~/.remote-nvim/scripts/neovim_install.sh -v v0.9.5 -d ~/.remote-nvim'" command failed to execute on remote host "user_name@<host ip addr>"
Description
I would love to have support for the dev container tool DevSpace.
Alternatives
A direct connection via SSH is possible, because DevSpace by default provide SSH port forwarding.
If you show me the path, then I would like to implement such feature! This is the most hardest part for me.
Just like telescope, we have no way to just copy ripgrep from host to remote client as it might not work as a binary… Unless we prepare all the necessary binary for all OS.
Don’t know if python wheel/ nodejs npm stuff can help this out?
Describe the bug
Last push fixed my other issue #52. But now I'm experiencing another one.
ERROR Thu 28 Sep 2023 12:35:19 PM EDT .local/share/nvim/lazy/remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:575: 'Get remote OS' failed.
stack traceback:
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:575: in function '_handle_job_completion'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:593: in function 'run_command'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:172: in function '_get_remote_os'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:106: in function '_setup_workspace_variables'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:519: in function <.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:518>
[C]: in function 'pcall'
.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:416: in function <.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:415>
ERROR Thu 28 Sep 2023 01:02:56 PM EDT .local/share/nvim/lazy/remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:418: /usr/share/nvim/runtime/lua/vim/ui.lua:50: E5560: vimL function must not be called in a lua loop callback
To Reproduce
Steps to reproduce the behavior:
Same as issue #52
System Info
Additional context
Describe the bug
During RemoteStart
, NeovimSSHProvider:get_user_selection
always hit the coroutine.yield()
statement and never reach the end of the get_user_selection
function.
To Reproduce
I just used my configuration (https://github.com/NilujePerchut/configs/tree/master/nvim) and add the following config:
{
"amitds1997/remote-nvim.nvim",
tag = "v0.0.1",
dependencies = {
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
"rcarriga/nvim-notify",
"nvim-telescope/telescope.nvim",
}
}
and
require("remote-nvim").setup()
Expected behavior
The RemoteStart
command does not perform the remote connection
System Info
Additional context
If I edit a workspace by hand, the RemoteStart
command works flawlessly.
I tried using the plugin in neovide, and it generally worked, but had some issues.
Steps to reproduce the behavior:
neovide
RemoteStart <host>
, with a host with the client-auto-connect option turned on.NVIM v0.10.0-dev-3048+gee41153a9-Homebrew
Build type: Release
LuaJIT 2.1.1713773202
NVIM v0.10.0-dev
Build type: Release
LuaJIT 2.1.1713484068
Following use cases would be better served through a single UI:
Sometimes, remote machines can't connect github.com 100% successfully.
so I encountered issue as below:
if possible, can we change the way of downloading neovim from:
http://ppa.launchpad.net/neovim-ppa/stable/ubuntu/
that's would be helpful
I'm working on MacOS with a new install of Neovim v0.9.1 from Homebrew and using LazyVim. I've added a file under .config/nvim/lua/plugins
that is
{
"amitds1997/remote-nvim.nvim",
tag = "v0.0.1", -- It is recommended that you keep this pinned to a tag
-- so that you do not pick up breaking changes
dependencies = {
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
"rcarriga/nvim-notify",
-- This would be an optional dependency eventually
"nvim-telescope/telescope.nvim",
}
}
After this plugin installs and I run :checkhealth
I get an error
I'm not sure where I put a config
table when working with LazyVim. How do I go about getting this set up?
Telescope Options
https://github.com/ibhagwan/fzf-lua
When resizing a terminal window, primarily when making it larger, the inner remote nvim session does not seem to resize with the terminal and stays the same size when connected.
I would like to see the remote nvim resize with the terminal either automatically, or by issuing a : command.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.