Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packages all installed into pack/minpac rather than their own pack/ subdirectories #48

Open
00dani opened this issue Jan 12, 2018 · 3 comments

Comments

@00dani
Copy link

00dani commented Jan 12, 2018

Currently, every package you install ends up in a directory pack/minpac/$TYPE/$PACKAGE_NAME, which I find a little confusing. The documentation states that packages will be installed into the following directories:

"start" plugins: <dir>/pack/<package_name>/start/<plugin_name>
"opt" plugins:   <dir>/pack/<package_name>/opt/<plugin_name>

I believe what this intends to say is that if you rename minpac itself, when you call minpac#init(), you can put everything under a different subdirectory of pack?

However, I initially interpreted this to mean that packages will be installed separately, such that package X ends up in pack/X/start/X rather than pack/minpac/start/X.

Is this design intentional? Does it perform better than using many separate Vim packages, for example? If not, should this be changed to align with my initial expectation?

@bstaletic
Copy link

Documentation wording is a little confusing. The documentation makes a distinction between packages and plugins. One package can contain multiple plugins. One example where this is useful is perhaps separating plugins by programming language they are used for (i.e. pack/C/start/<c language plugin>/).

Considering you're not dealing with plugins on your own, but by the means of minpac, I believe it is reasonable to "namespace" minpac plugins under pack/minpac. That way you can separate manually installed plugins and minpac plugins.

@00dani
Copy link
Author

00dani commented Feb 12, 2018

Ah, okay. That does sound reasonable, and certainly pack/X/start/X wouldn't be a very useful way to namespace your plugins. However, perhaps it should be possible to adjust the package name used for individual minpac plugins? As in your example, you might want to group plugins by language:

call minpac#add('mzlogin/vim-markdown-toc', {'package': 'markdown'})
call minpac#add('suan/vim-instant-markdown', {'package': 'markdown'})

call minpac#add('jmcomets/vim-pony', {'package': 'python'})
call minpac#add('python-mode/python-mode', {'package': 'python'})

Or perhaps even something like this?

call minpac#group('markdown', [
      \ 'mzlogin/vim-markdown-toc',
      \ 'suan/vim-instant-markdown',
      \ ])

call minpac#group('python', [
      \ 'jmcomets/vim-pony',
      \ 'python-mode/python-mode',
      \ ])

Of course, the relative ugliness of multi-line expressions in vimscript means that approach looks really really bad, so maybe something inspired by augroup syntax would be better:

call minpac#group('markdown')
call minpac#add('mzlogin/vim-markdown-toc')
call minpac#add('suan/vim-instant-markdown')
call minpac#group('END')

Thoughts?

@ipatch
Copy link

ipatch commented Jun 22, 2018

@00dani

Vim8 introduced some new features specifically for dealing with packages, thus that is why minpac creates the directories the way it does. Not trying paraphrase the docs or rewrite wheel, but here is a pretty decent explanation of what Neovim and Vim8 do with packages.

https://vi.stackexchange.com/a/9523/10550

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants