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
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).
When trying to connect to a remote machine like a raspberry pi, neovim app image installation fails due to it being an ARM platform
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>"
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.
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
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.
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.
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.
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) |
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
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 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?
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
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
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.
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
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
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.
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
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
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
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)
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.