Giter Site home page Giter Site logo

Comments (9)

amitds1997 avatar amitds1997 commented on July 2, 2024

This is expected behavior (with the current implementation). This arises from your plugin manager (lazy.nvim) trying to install your plugins (not remote-nvim.nvim). Since there are a lot of plugin managers out there, there is no reliable way to ensure how to copy things over.

Maybe, I can add an extra option to specify people to specify directories in their XDG_STATE_HOME and XDG_DATA_HOME that they want to copy over to the remote as well. Then, we should be able to avoid this. 🤔

from remote-nvim.nvim.

littenglt avatar littenglt commented on July 2, 2024

after transfer nvim configurations, we can send ~/.local/share/nvim/ to remote machine directly?
what do you think?

from remote-nvim.nvim.

amitds1997 avatar amitds1997 commented on July 2, 2024

after transfer nvim configurations, we can send ~/.local/share/nvim/ to remote machine directly? what do you think?

Sounds fair. I would add a * to make sure that you can copy it over without having to specify individual directories ✅

Why not make it the default? There is data stored by plugins such as Mason which might not be compatible across OSs.

from remote-nvim.nvim.

littenglt avatar littenglt commented on July 2, 2024

all the source code and executeable binary of plugins that needed locate on ~/.local/share/nvim

from remote-nvim.nvim.

amitds1997 avatar amitds1997 commented on July 2, 2024

On my system, this is the state of ~/.local/share/nvim
image

All my plugins are stored by lazy.nvim under lazy folder.
Mason stores it's packages under mason but they are specifically for MacOS, so I'm not sure if they would be cross-os compatible.
There is telescope_history too which I can copy over to the remote but would not make sense for another machine because they are machine specific.

So, that's why I'm thinking configuration syntax of this type:

{
   data = "*", -- Copies everything inside the `~/.local/share/nvim`
   state = { "abc", "def" }, -- Copies only the specified directories over
}

One can use it to specify however one wishes to copy data over. So, this would support both yours and my use case.

Thanks for raising this issue btw, this would improve my quality of life too.

from remote-nvim.nvim.

littenglt avatar littenglt commented on July 2, 2024

it would be more elegent like below:

{
    scp_list = [
        '~/.config/nvim',
        ‘~/.local/sharenvim'
   ]
   exclude = []
}

if user select offline mode for remote machine
we just zip them seperately, scp, and unzip them to folder properly

from remote-nvim.nvim.

amitds1997 avatar amitds1997 commented on July 2, 2024

Do you expect to copy over any other directories except your configuration and your plugins?

Why I kept it as

{
   data = "*", -- Copies everything inside the `~/.local/share/nvim`
   state = { "abc", "def" }, -- Copies only the specified directories over
}

is because data corresponds to vim.fn.stdpath("data") and state corresponds to vim.fn.stdpath("state"). This helps me in determining exactly where to place the directories on the remote. This also helps in cleaning up the directories on the remote once you are done.

With scp_list, it gives me flexibility to copy over directories and specify things easily but it does not tell us where to place the copied over directories.

from remote-nvim.nvim.

amitds1997 avatar amitds1997 commented on July 2, 2024

I have added feature to add this in the latest release (v0.2.3). Documentation for the same is available here. If you still see any such issues, let me know.

For plugins, you would want to copy over your plugins directories onto your remote. Since you are using lazy, it might look something like this:

require('remote-nvim').setup({
   remote = {
     copy_dirs = {
       data = {
         dirs = { "lazy" },
         compression = {
           enabled = true,
         },
       },
     },
   },
})

In my tests, this was enough to not use internet at all and still make things work on the remote. This was done along with the offline-mode changes. I did observe that treesitter did not work unless I gave it internet access but that could be something specific to my configuration. Your mileage may vary. If you still see any issues, I'll be happy to look into it. Thanks!!

from remote-nvim.nvim.

littenglt avatar littenglt commented on July 2, 2024

Great!

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.