aboutsummaryrefslogtreecommitdiff
path: root/eclass/neovim-plugin.eclass
blob: 6e1207840acc53fe81741370448883d8ccb4eafa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Copyright 2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

# @ECLASS: neovim-plugin.eclass
# @MAINTAINER:
# navi@vlhl.dev
# @SUPPORTED_EAPIS: 8
# @BLURB: used for installing neovim plugins

case ${EAPI} in
	8) ;;
	*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac

if [[ -z ${_NEOVIM_PLUGIN_ECLASS} ]]; then
_NEOVIM_PLUGIN_ECLASS=1

DEPEND+=" app-editors/neovim"
IUSE+=" start"

NEOVIM_PACK="${EPREFIX}/usr/share/nvim/site/portage"

# @FUNCTION: neovim-plugin_src-install
# @DESCRIPTION: installs the plugin into the runtime
# folder, in a path visible to packadd
neovim-plugin_src_install() {
	insinto "${NEOVIM_PACK}/$(usex start start opt)/${PN}"
	doins -r *
}

neovim-plugin_src_compile() { :; }

fi

EXPORT_FUNCTIONS src_compile src_install