Giter Site home page Giter Site logo

Comments (12)

amitds1997 avatar amitds1997 commented on May 25, 2024 1

Use webinstall or any other similar tool. It provides common tools (including rip-grep) to be installed using curl and could be an easy way to install any necessary tools that we may need. Again, not tested but this looks to be the simplest way.

This seems to be the ideal solution for the current use case. We would have to do the following to achieve this:

  1. In the plugin configuration, add an extra option remote_tool_list (this can be named better). It would take a list of tools that need to be installed from this list.
  2. Pass this list to the install script.
  3. For each tool in the list, check if the binary for the tool is present, if not, install it using webinstall.

Additionally, we want to make sure that all tools are installed inside the ~/.remote-nvim folder so that it can be easily cleaned up from the remote, if needed.

from remote-nvim.nvim.

konosubakonoakua avatar konosubakonoakua commented on May 25, 2024 1

Why not adapt VSCode's strategy,download everything in the client (our local PC), zip them then use scp to copy the archive file to the ssh host (remote PC), then unzip and run the remote server something.

from remote-nvim.nvim.

amitds1997 avatar amitds1997 commented on May 25, 2024

Python or node might not be available on all systems. Specially, docker containers which I plan to support soon. So, there is unfortunately no universal way to install it unless the binary that we need provides for it.

I can think of 3 approaches currently:

  1. Plugin supports neovim_install_script_path config key through which one can specify their own installation script (that extends the packaged installation script to install any necessary packages after Neovim gets installed) but they would have to do the heavy lifting of installing the correct binary on the correct OS.
  2. Use Homebrew. It supports both Linux and MacOS, so it can be a common package manager and things should work on both systems with a single command, this could alleviate the issue of installing different binaries on different OS as [Homebrew] would take care of it. Not tested though.
  3. Use webinstall or any other similar tool. It provides common tools (including rip-grep) to be installed using curl and could be an easy way to install any necessary tools that we may need. Again, not tested but this looks to be the simplest way.

Let me know if you have any other suggestions on how we can support this though. I am open to ideas.

from remote-nvim.nvim.

qlibp avatar qlibp commented on May 25, 2024

I have a situation that I can’t access internet on remote machine(e.g. deploying software on a robot and can only access it through local networks), but my laptop/local machine could access internet. Then what’s best workflow for remote-nvim?

from remote-nvim.nvim.

qlibp avatar qlibp commented on May 25, 2024

From webinstall, I notice there’s a c/cpp complier called zig. If that’s cross-platform,then we may be able to rely on it build binary locally? This the last method for those package that have no official binary, and the user could still easily port their package to different OS? But this methods require the user to write their own build script.

from remote-nvim.nvim.

qlibp avatar qlibp commented on May 25, 2024

The list of webinstall is kind of limited. Binary like lazygit/tig/fzf stuff is not presented in the list

from remote-nvim.nvim.

amitds1997 avatar amitds1997 commented on May 25, 2024

I have a situation that I can’t access internet on remote machine(e.g. deploying software on a robot and can only access it through local networks), but my laptop/local machine could access internet. Then what’s best workflow for remote-nvim?

Ah! I completely misunderstood the requirement. I thought it was just how to install correct tool binaries for dependencies like ripgrep, gcc, etc. locally and then copy it over to remote server.

The list of webinstall is kind of limited. Binary like lazygit/tig/fzf stuff is not presented in the list

Then we might want to look at some other tool/methodologies :(. If we want to do a complete local installation and then transfer it over, it would take some more time to figure out an ideal strategy. One challenge is to figure out how to download and transfer plugins, LSPs, tools, etc. Tools could still be easy if they provide binaries for the other OS and we can just download and scp that. Let me put some more thought into it.

I have a situation that I can’t access internet on remote machine(e.g. deploying software on a robot and can only access it through local networks), but my laptop/local machine could access internet. Then what’s best workflow for remote-nvim?

For now, you can setup a proxy server like squid on remote and use that to connect to internet using remote SSH tunneling. You can follow this SO question for the steps: Give server access to internet via client and remote-neovim should work fine, as is.

from remote-nvim.nvim.

qlibp avatar qlibp commented on May 25, 2024

It's quite a work to prepare all the binaries for everyone, with so much different environments, I think the best way would be provide a common set of build tools, and we build the binary when we need it, just like treesitter, they build from source after we download it. If we go that further to provide all needed binary, it feels like we are implementing another package manager.

from remote-nvim.nvim.

amitds1997 avatar amitds1997 commented on May 25, 2024

Why not adapt VSCode's strategy,download everything in the client (our local PC), zip them then use scp to copy the archive file to the ssh host (remote PC), then unzip and run the remote server something.

Agree. We would adopt this strategy for local installation of Neovim server. This discussion is a bit more extended and talks about a possible way to ship necessary binaries as well. For example, telescope fzf plugin requires fzf to be present on the path. Is there a simple and easy way to make that available on the remote host or not.

from remote-nvim.nvim.

qlibp avatar qlibp commented on May 25, 2024

Why not adapt VSCode's strategy,download everything in the client (our local PC), zip them then use scp to copy the archive file to the ssh host (remote PC), then unzip and run the remote server something.

simply unzip the file won’t work, take a look at my problem. Even the lua lsp has some hard coded path generated during installation procedure.

from remote-nvim.nvim.

amitds1997 avatar amitds1997 commented on May 25, 2024

simply unzip the file won’t work, take a look at my problem. Even the lua lsp has some hard coded path generated during installation procedure.

Lua LSP should be easily manageable. I use it all the time in my remote development. If you want it to auto-install, use something like mason.nvim and auto install it using mason-lspconfig. For reference, this is the only part where I specifically configure my Lua LSP server: lua_lsp

from remote-nvim.nvim.

amitds1997 avatar amitds1997 commented on May 25, 2024

We don't have a clear way forward for this right now. If anyone has any new ideas, please create a new issue. Thanks!

from remote-nvim.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.