summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-editors')
-rw-r--r--app-editors/neovim/metadata.xml3
-rw-r--r--app-editors/neovim/neovim-0.0.0_pre20150814.ebuild11
2 files changed, 13 insertions, 1 deletions
diff --git a/app-editors/neovim/metadata.xml b/app-editors/neovim/metadata.xml
index d5a0b7af40f6..4ead8c2a61bf 100644
--- a/app-editors/neovim/metadata.xml
+++ b/app-editors/neovim/metadata.xml
@@ -2,6 +2,9 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>vim</herd>
+ <use>
+ <flag name='nvimpager'>Install nvimpager symlink to less.sh macro</flag>
+ </use>
<upstream>
<remote-id type="github">neovim/neovim</remote-id>
</upstream>
diff --git a/app-editors/neovim/neovim-0.0.0_pre20150814.ebuild b/app-editors/neovim/neovim-0.0.0_pre20150814.ebuild
index 0dd499e107d2..27615d2a9f9e 100644
--- a/app-editors/neovim/neovim-0.0.0_pre20150814.ebuild
+++ b/app-editors/neovim/neovim-0.0.0_pre20150814.ebuild
@@ -17,7 +17,7 @@ fi
LICENSE="Apache-2.0 vim"
SLOT="0"
-IUSE="perl python"
+IUSE="+nvimpager perl python"
CDEPEND="dev-lang/luajit:2
>=dev-libs/libtermkey-0.17
@@ -42,6 +42,9 @@ src_prepare() {
# add eclass to bash filetypes
sed -e 's|*.ebuild|*.ebuild,*.eclass|' -i runtime/filetype.vim || die
+ # make less.sh macro actually work with neovim
+ sed -e 's|vim |nvim |g' -i runtime/macros/less.sh || die
+
cmake-utils_src_prepare
}
@@ -60,7 +63,13 @@ src_configure() {
src_install() {
cmake-utils_src_install
+
# install a default configuration file
insinto /etc/vim
doins "${FILESDIR}"/nvimrc
+
+ # conditionally install a symlink for nvimpager
+ if use nvimpager; then
+ dosym /usr/share/nvim/runtime/macros/less.sh /usr/bin/nvimpager
+ fi
}