You are not logged in.

#1 2019-03-11 14:40:56

bergentroll
Member
Registered: 2016-08-23
Posts: 30

Vim plugins from repos with Neovim: how to achieve?

I am a Neovim user, and most needed for me Vim plugins are already in Arch repositories, and they works flawless. But most of them depends on vanilla Vim's packages vim and vim-runtime.

I had an idea that neovim should provides vim and vim-runtime, and I pulled bug, but it seems a contributor has been disagreed with this. So Is there a way to have Neovim with plugins on system without vanilla Vim installed and also without broken dependencies?

Currently I am on Plug plugins manager, but it takes plugins directly from github.com, and I would prefer to use system package manager.

Offline

#2 2019-03-11 15:55:45

Awebb
Member
Registered: 2010-05-06
Posts: 6,272

Re: Vim plugins from repos with Neovim: how to achieve?

If Neovim doesn't need its own folder structure and can read the Vim plugin folders, maybe the plugins don't need vim and vim-runtime as a dependency. I think neovim is not a drop-in replacement for vim, therefore it cannot provide vim and vim-runtime and it shouldn't, especially not just because a rewrite might or might not support them.

In the meantime, you can either build your own neovim package or live with vim installed... or maybe your own vim dummy package?

Online

#3 2019-03-12 07:56:34

bergentroll
Member
Registered: 2016-08-23
Posts: 30

Re: Vim plugins from repos with Neovim: how to achieve?

Yes, Neovim  looks through /usr/share/vim. But it seems correct for me that plugins depends on Vim, because without Vim/GVim/Neovim they are useless. And yes, Neovim does not provide /usr/bin/vim executable, so I see now that it is a good reason why nvim is not a drop-in replacement like neomutt does not provide mutt.

Having vim is an option, but it is not too beauty solution, you know… Yes, having own vim and vim-runtime dummy package seems most reasonable in this case.

Offline

#4 2019-03-12 09:01:17

ayekat
Member
Registered: 2011-01-17
Posts: 1,589

Re: Vim plugins from repos with Neovim: how to achieve?

Awebb wrote:

If Neovim doesn't need its own folder structure and can read the Vim plugin folders, maybe the plugins don't need vim and vim-runtime as a dependency.

More importantly, I'd say the plugin packages themselves don't actually require vim. Sure, they're not particularly useful on their own, but technically they don't "break" or anything (like a program would that is missing a library) if none of vim/nvim is installed.

It's a bit like a hypothetical package providing desktop background images: it doesn't require a program that can set desktop backgrounds, or an image viewer, since the images are merely a resource used by another application, but don't do anything on their own.


--edit: spelling

Last edited by ayekat (2019-03-12 09:01:47)


pkgshackscfgblag

Offline

#5 2019-03-12 09:24:14

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: Vim plugins from repos with Neovim: how to achieve?

Instead of a dummy package I guess you could include symlinks/shellscripts from the binaries provided by vim to neovim and call it neovim-vim-compat or something like that.

Last edited by progandy (2019-03-12 09:28:28)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#6 2019-03-12 12:43:21

Awebb
Member
Registered: 2010-05-06
Posts: 6,272

Re: Vim plugins from repos with Neovim: how to achieve?

progandy wrote:

Instead of a dummy package I guess you could include symlinks/shellscripts from the binaries provided by vim to neovim and call it neovim-vim-compat or something like that.

I guess the whole reason for this operation is the urge to have neovim installed without vim, while using.

As a summary of the problem:

  • https://www.archlinux.org/packages/extra/x86_64/vim/
    The neovim package cannot provide vim and vim-runtime, as long as there is no guarantee, that neovim will not break any of the 106 packages required by vim, as well as the 4 packages required by vim-runtime.

  • All the vim addons, plugins and script in the Arch repos have at least vim as a dependency.

  • One might want to use neovim and ditch vim for various reasons.

  • bergentroll does not want to use external plugin managers.

We have several options:

  1. A dummy package

    • bergentroll risks breaking the 106 vim dependent packages he doesn't care about and frankensteins a dummy package for vim and vim-runtime.

    • He'll essentially be done with it, because unless something requires an exact vim version, the dummy can sit there indefinitely, and if something requires a specific Vim version, then it won't work with Neovim anyway.

  2. Change the way vim-plugins work

    • We convince whoever is in charge of the packaging rules for vim-plugins, that those plugins technically do not require vim and could as well have vim and neovim as optional dependencies. The package just sits there and does nothing. You can install pretty much every library without anything depending on that library. In a sense, those vim-plugins can be libraries, that do nothing unless they're being loaded in vim. Fluffy terms like "first-class citizen" could now be applied to neovim.

    • We need to figure out, why the vim-plugins maintainer(s) should care about neovim compatibility.

Approach the maintainers with those new results and maybe they'll agree.

Online

#7 2019-03-12 12:50:49

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: Vim plugins from repos with Neovim: how to achieve?

Awebb wrote:
progandy wrote:

Instead of a dummy package I guess you could include symlinks/shellscripts from the binaries provided by vim to neovim and call it neovim-vim-compat or something like that.

I guess the whole reason for this operation is the urge to have neovim installed without vim, while using.

Maybe I did not explain myself well enough. Instead of creating an empty "dummy" package create a "compat" package that provides symlinks from e.g. /usr/bin/vim to /usr/bin/neovim. This compatibility package will then conflict and provide vim. I believe that should work with most packages that rely on vim scripting.

I just found this in the AUR: https://aur.archlinux.org/packages/neovim-drop-in/

Last edited by progandy (2019-03-12 12:53:59)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#8 2019-03-12 14:00:29

Awebb
Member
Registered: 2010-05-06
Posts: 6,272

Re: Vim plugins from repos with Neovim: how to achieve?

progandy wrote:
Awebb wrote:
progandy wrote:

Instead of a dummy package I guess you could include symlinks/shellscripts from the binaries provided by vim to neovim and call it neovim-vim-compat or something like that.

I guess the whole reason for this operation is the urge to have neovim installed without vim, while using.

Maybe I did not explain myself well enough. Instead of creating an empty "dummy" package create a "compat" package that provides symlinks from e.g. /usr/bin/vim to /usr/bin/neovim. This compatibility package will then conflict and provide vim. I believe that should work with most packages that rely on vim scripting.

I just found this in the AUR: https://aur.archlinux.org/packages/neovim-drop-in/

That pretty much looks like what OP needs, yes. Since neovim isn't 100% vim compatible, there is a chance something won't work. Calling it compat is one option, but that package will not guarantee vim compatibility. For the sake of clarity, I consider simple compat packages dummy packages. They don't do much.

Online

#9 2019-03-13 04:01:11

aether
Member
Registered: 2011-12-17
Posts: 6

Re: Vim plugins from repos with Neovim: how to achieve?

https://aur.archlinux.org/packages/neovim-symlinks/

Here ya go, pal. Provides vi and vim.

Last edited by aether (2019-03-13 04:01:32)

Offline

#10 2019-03-13 04:24:05

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: Vim plugins from repos with Neovim: how to achieve?

Whoa, I'm surpised so many posts are suggesting going in that direction.  I'd strongly advocate for Ayekat's and
AWebb's #2 option.  While urging and waiting for the packagers to remove the incorrect dependency on vim/vim-runtime, one can quite easily build their own packages for these without those dependencies.  This is the most direct approach to the OP's goal of getting the plugin directly while also using the system package manager.  It is also by far the cleanest solution in the thread.

Last edited by Trilby (2019-03-13 04:25:41)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB