Gentoo Archives: gentoo-dev

From: "Vadim A. Misbakh-Soloviov" <gentoo@×××.name>
To: gentoo-dev@l.g.o
Cc: vim@g.o
Subject: [gentoo-dev] [RFC] NeoVim and vim-syntax
Date: Wed, 31 May 2017 19:32:41
Message-Id: 15162118.1WtZIBpG5a@note
1 Currently, we have a situation, that there are two Vim's: "old" one (vim8) and
2 NeoVim (for those who do not know: a fork of Vim with much and much more clean
3 code, many neat features and so on).
4
5 Unfortunately, both of them have different runtimedirs: XDG ones for NeoVim
6 and the ones you know for Vim8, while NeoVim is fully compatible with Vim's
7 plugins, and epecially with vimscripts (like syntax definitions and ftdetect
8 scripts).
9
10 On the other side, we have a bunch of packages in the portage tree, that have
11 "vim syntax" support (use-flags, or direct vim-syntax packages), or even vim-
12 plugins.
13 All of them goes to `/usr/share/vim/vimfiles`, while correct path for NeoVim
14 would be `/usr/share/nvim/site` (does not exist at the moment, but nvim checks
15 for it).
16
17 So, that situation leads to impossibility to get all of that syntax definitions
18 and plugins when user uses NeoVim.
19
20 As I said above, NeoVim supports Vim's plugins/scripts very well (although I
21 didn't find any evidence of the opposite), so it is possible to fix that
22 situation by many of "kludge" ways, including:
23
24 - implementing "nvim-syntax" (and `app-nvim/*`?) and duplicate all the
25 installed files
26
27 - patching NeoVim source to include Vim's runtimedirs (incl. "after" dir),
28 // NeoVim upstream highly disagree with such way, if any
29
30 - patching VIMRUNTIME environment variable,
31
32 - making a wrapper,
33
34 - rewrite all the existing ebuilds to take nvim into account and force all
35 newcomers to also take it,
36
37 - symlinking a directory,
38 // mostly bad way, since opposite plugin compatibility is not garanteed and
39 users can install nvim-only plugins in the future
40
41 - making postinst hook to regenerate content of NeoVim's site-directory
42 (maybe, by symlinking installed vim modules there)
43
44 or even:
45
46 - making eselect module for user to rule that.
47
48 Although, talking on eselect module, I've two visions of the situation:
49 a) it can be something like bashcomp module, where users can select which of
50 installed vim modules they want to "enable" in NeoVim
51 or (better, imo) way:
52 b) it can be something like php module, where portage installs all the stuff
53 in the location neither available to Vim nor NeoVim, and users selects which
54 modules they enable for either implementation.
55
56 Module can be called something like "eselect-vim" or "eselect-vim-modules"
57 (?), if any.
58
59
60 For now, I have preview of neither of eselect module variants, nor even
61 patches for another "ways". I'd very like to discuss the situation and find a
62 better of possible solution first.
63 Maybe, when (if?) we found such a solution, I'd contribute a PR with it on GH.
64
65 --
66 wbr,
67 mva

Replies

Subject Author
Re: [gentoo-dev] [RFC] NeoVim and vim-syntax Peter Volkov <peter.volkov@×××××.com>
Re: [gentoo-dev] [RFC] NeoVim and vim-syntax Ciaran McCreesh <ciaran.mccreesh@××××××××××.com>
Re: [gentoo-dev] [RFC] NeoVim and vim-syntax "Vadim A. Misbakh-Soloviov" <gentoo@×××.name>
[gentoo-dev] Re: [RFC] NeoVim and vim-syntax Patrice Clement <monsieurp@g.o>