summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrent Palmer2018-11-13 23:24:34 -0800
committerTrent Palmer2018-11-13 23:24:34 -0800
commitf640ea0138c5dadaee55026d8156fe695b07db7b (patch)
tree58805d1c970e1279d2e11c47e3df3fc0ba3eeec8
downloadaur-f640ea0138c5dadaee55026d8156fe695b07db7b.tar.gz
add deoplete
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD56
-rw-r--r--deoplete.install41
3 files changed, 118 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..6e43a8992c9
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = deoplete
+ pkgdesc = deoplete completion plugin for neovim
+ pkgver = 4.1
+ pkgrel = 1
+ url = https://github.com/Shougo/deoplete.nvim
+ install = deoplete.install
+ arch = any
+ license = MIT
+ makedepends = git
+ depends = python-neovim
+ optdepends = vim: vim support
+ optdepends = neovim: neovim support
+ optdepends = nvim-yarp: vim support
+ optdepends = vim-hug-neovim-rpc: vim support
+ provides = deoplete
+ conflicts = deoplete-git
+ source = deoplete-4.1.tar.gz::https://github.com/Shougo/deoplete.nvim/archive/4.1.tar.gz
+ md5sums = d4afc367355a1c55fbc758d6cea382f4
+
+pkgname = deoplete
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..b9c2a0e953b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,56 @@
+# Maintainer: Trent Palmer trenttdually at gmail
+
+###########################################################################################################
+# Build Options
+###########################################################################################################
+_vim="y"
+
+# neovim can load plugins installed as vim plugins
+_neovim="n"
+###########################################################################################################
+
+_name='deoplete'
+pkgname="${_name}"
+pkgver=4.1
+pkgrel=1
+pkgdesc="deoplete completion plugin for neovim"
+arch=('any')
+url="https://github.com/Shougo/deoplete.nvim"
+license=('MIT')
+groups=()
+depends=('python-neovim')
+optdepends=('vim: vim support'
+ 'neovim: neovim support'
+ 'nvim-yarp: vim support'
+ 'vim-hug-neovim-rpc: vim support')
+makedepends=('git')
+provides=('deoplete')
+conflicts=('deoplete-git')
+replaces=('')
+backup=()
+options=()
+install="${_name}.install"
+source=("$_name-$pkgver.tar.gz::${url}/archive/${pkgver}.tar.gz")
+noextract=()
+md5sums=('d4afc367355a1c55fbc758d6cea382f4')
+
+prepare() {
+ mv "${pkgname}.nvim-${pkgver}" "${pkgname}"
+}
+
+package() {
+ if [ "$_neovim" = "y" ]; then
+ mkdir -p "${pkgdir}/usr/share/nvim/runtime"
+ cp -r "${srcdir}/${_name}/"{autoload,doc,plugin,rplugin} \
+ "${pkgdir}/usr/share/nvim/runtime"
+ fi
+
+ if [ "$_vim" = "y" ]; then
+ mkdir -p "${pkgdir}/usr/share/vim/vimfiles"
+ cp -r "${srcdir}/${_name}/"{autoload,doc,plugin,rplugin} \
+ "${pkgdir}/usr/share/vim/vimfiles"
+ fi
+
+ install -D -m644 "${srcdir}/${_name}/README.md" $pkgdir/usr/share/doc/$pkgname/README.md
+ install -D -m644 "${srcdir}/${_name}/LICENSE" $pkgdir/usr/share/licenses/$pkgname/LICENSE
+}
diff --git a/deoplete.install b/deoplete.install
new file mode 100644
index 00000000000..4b51238632e
--- /dev/null
+++ b/deoplete.install
@@ -0,0 +1,41 @@
+update_vim_help() {
+ echo -n "Updating Vim help tags..."
+ /usr/bin/vim --noplugin -u NONE -U NONE \
+ --cmd ":helptags /usr/share/vim/vimfiles/doc" --cmd ":q" > /dev/null 2>&1
+ echo "done."
+}
+
+update_helptag() {
+ echo -n "Updating neovim (nvim) help tags..."
+ /usr/bin/nvim --noplugins -u NONE -U NONE --cmd ":helptags /usr/share/nvim/runtime/doc" --cmd ":q" > /dev/null 2>&1
+ echo "done. "
+}
+
+post_install() {
+ update_helptag
+ echo ""
+ echo " Note: Python3 must be enabled before updating remote plugins
+ If Deoplete was installed prior to Python support being added to Neovim, :UpdateRemotePlugins
+ should be executed manually in order to enable auto-completion."
+
+ echo ""
+ echo " you might need to add the following to your init.vim/vimrc:
+ \"let g:deoplete#enable_at_startup = 1\""
+ echo ""
+ update_vim_help
+}
+
+post_upgrade() {
+ update_helptag ${1}
+ update_vim_help "$1"
+}
+
+post_remove() {
+ update_helptag
+
+ echo ""
+ echo " you might need to remove the following to your init.vim/vimrc:
+ \"let g:deoplete#enable_at_startup = 1\""
+ echo ""
+ update_vim_help
+}