Git Product home page Git Product logo

Comments (17)

k-takata avatar k-takata commented on May 21, 2024

I don't use Neovim, so I don't know about the :UpdateRemotePlugins command.
What does the command do?

How about the following command?

call minpac#update('', {'do': 'UpdateRemotePlugins'})

from minpac.

ghqhxnfizloub avatar ghqhxnfizloub commented on May 21, 2024

Yes, that will work. I just think it is better to do it inside minpac#update(), as it is always a must-do on Neovim, just like :helptags ALL.

from minpac.

k-takata avatar k-takata commented on May 21, 2024

Hmm, it failed on Neovim.
https://travis-ci.org/k-takata/minpac/jobs/263525029
Any idea?

from minpac.

ghqhxnfizloub avatar ghqhxnfizloub commented on May 21, 2024

This seems to be related with --noplugin. I tried on my machine and neovim does not have :UpdateRemotePlugins when started with --noplugin.

from minpac.

k-takata avatar k-takata commented on May 21, 2024

Ah, okay. I will add checking for existence of the command.

from minpac.

k-takata avatar k-takata commented on May 21, 2024

Please try the latest commit.

from minpac.

ghqhxnfizloub avatar ghqhxnfizloub commented on May 21, 2024

Thanks!

from minpac.

jsfaint avatar jsfaint commented on May 21, 2024

It looks this hook not work on my side

A fresh installation, 36 plugins was installed, a empty rplugin.vim was generated, but the remote plugins was not registered.
image

Maybe on the time UpdateRemotePlugins was called, these plugin were not sourced yet?

from minpac.

k-takata avatar k-takata commented on May 21, 2024

Sorry for the late response.
call minpac#update() doesn't source any plugins. Plugins are sourced at start up of Vim or when you load it manually by :packadd <plugin>, etc.
Does UpdateRemotePlugins work only when plugins are sourced?

from minpac.

jsfaint avatar jsfaint commented on May 21, 2024

Thanks for the reply
Yes, the plugin must be sourced first.
Maybe minpac need to run :packloadall before run UpdateRemotePlugins?

from minpac.

k-takata avatar k-takata commented on May 21, 2024

I don't want to load all plugins after minpac#update().
Currently I don't have a good idea for this.
Maybe, defining your own command is a good way? E.g.:

command! PackUpdate packadd minpac | source $MYVIMRC | call minpac#update() | packloadall | UpdateRemotePlugins

(untested)

Do opt plugins also need to be loaded when executing UpdateRemotePlugins? If so, this might be not enough, because packloadall doesn't load opt plugins.

from minpac.

jsfaint avatar jsfaint commented on May 21, 2024

Thanks for your clarify.
But this didn't works for me, maybe because call minpac#update() is async.
In this command chain, when UpdateRemotePlugins was called, the minpac#update() is still in progress

from minpac.

k-takata avatar k-takata commented on May 21, 2024

But this didn't works for me, maybe because call minpac#update() is async.

Oops, I forgot that.
BTW, I try a new approach. See #47.

from minpac.

jsfaint avatar jsfaint commented on May 21, 2024

I tried the nvim-rplugin branch, but when I run :PackUpdate command, it shows the error below:
image

The minimal vimrc:

let s:rc_path = fnamemodify(expand('<sfile>'), ':h')

let s:minpac = expand(s:rc_path . '/pack/minpac/opt/minpac')

if !isdirectory(glob(s:minpac))
  execute '!git clone https://github.com/k-takata/minpac.git' s:minpac
  execute '!git -C' s:minpac 'checkout nvim-rplugin'
endif

command! PackUpdate packadd minpac | source $MYVIMRC | call minpac#update()
command! PackClean  packadd minpac | source $MYVIMRC | call minpac#clean()

if exists('*minpac#init')
  " minpac is loaded.
  call minpac#init()
  call minpac#add('k-takata/minpac', {'type': 'opt'})
  call minpac#add('Shougo/deoplete.nvim')
endif

"deoplete.nvim
let g:deoplete#enable_at_startup = 1
let g:deoplete#ignore_sources = {}
let g:deoplete#ignore_sources._ = [
      \   'around',
      \ ]

The reproduce step is:

  1. Remove pack directory
  2. Open nvim, the minpac will be auto cloned into /pack/minpac/opt/minpac
  3. Run :PackUpdate

The error will be showed up.

from minpac.

k-takata avatar k-takata commented on May 21, 2024

Oh, sorry.
Could you try again?

from minpac.

jsfaint avatar jsfaint commented on May 21, 2024

It works now 👍
Thank you @k-takata

from minpac.

k-takata avatar k-takata commented on May 21, 2024

Thank you for testing.

from minpac.

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.