aboutsummaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
Diffstat (limited to 'eclass')
-rw-r--r--eclass/neovim-plugin.eclass35
1 files changed, 35 insertions, 0 deletions
diff --git a/eclass/neovim-plugin.eclass b/eclass/neovim-plugin.eclass
new file mode 100644
index 0000000..6e12078
--- /dev/null
+++ b/eclass/neovim-plugin.eclass
@@ -0,0 +1,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