modified deoplete-git and deoplete-jedi-git to work with vim

This commit is contained in:
Trent Palmer 2018-02-25 18:12:47 -08:00
parent 37a402707e
commit 4f4c65a1f9
6 changed files with 84 additions and 36 deletions

View File

@ -1,6 +1,6 @@
pkgbase = deoplete-git
pkgdesc = deoplete completion plugin for neovim
pkgver = 4.0.serial.r95.gcbd884d
pkgver = 4.0.serial.r107.gb14aa70
pkgrel = 1
url = https://github.com/Shougo/deoplete.nvim
install = deoplete.install
@ -8,7 +8,10 @@ pkgbase = deoplete-git
license = MIT
makedepends = git
depends = python-neovim
depends = python2-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
source = deoplete::git://github.com/Shougo/deoplete.nvim

View File

@ -1,14 +1,27 @@
# Maintainer: Trent Palmer trenttdually at gmail
###########################################################################################################
# Build Options
###########################################################################################################
_vim="y"
_neovim="y"
###########################################################################################################
_name='deoplete'
pkgname="${_name}-git"
pkgver=4.0.serial.r95.gcbd884d
pkgver=4.0.serial.r107.gb14aa70
pkgrel=1
pkgdesc="deoplete completion plugin for neovim"
arch=('any')
url="https://github.com/Shougo/deoplete.nvim"
license=('MIT')
groups=()
depends=('python-neovim' 'python2-neovim')
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')
@ -21,15 +34,23 @@ noextract=()
md5sums=('SKIP')
pkgver() {
cd "${srcdir}/${_name}"
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
cd "${srcdir}/${_name}"
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
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"
"$pkgdir/usr/share/nvim/runtime"
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
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
}

View File

@ -1,3 +1,3 @@
### not working
for now this only works with neovim
deoplete works with vim, but not yet with this particular package
### no longer not working
this is now packaged so that it works with vim and/or
neovim

View File

@ -1,31 +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. "
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."
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 ""
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_helptag ${1}
update_vim_help "$1"
}
post_remove() {
update_helptag
update_helptag
echo ""
echo " you might need to remove the following to your init.vim/vimrc:
\"let g:deoplete#enable_at_startup = 1\""
echo ""
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
}

View File

@ -1,6 +1,6 @@
pkgbase = deoplete-jedi-git
pkgdesc = jedi add-on for deoplete completion plugin for neovim
pkgver = r226.f7a0c4f
pkgver = r228.0410de7
pkgrel = 1
url = https://github.com/zchee/deoplete-jedi
arch = any

View File

@ -1,16 +1,22 @@
# Maintainer: Trent Palmer trenttdually at gmail
###########################################################################################################
# Build Options
###########################################################################################################
_vim="y"
_neovim="y"
###########################################################################################################
_name='deoplete-jedi'
pkgname="${_name}-git"
pkgver=r226.f7a0c4f
pkgver=r228.0410de7
pkgrel=1
pkgdesc="jedi add-on for deoplete completion plugin for neovim"
arch=('any')
url="https://github.com/zchee/deoplete-jedi"
license=('MIT')
groups=()
# python-jedia pulls in python-parso
# perhaps the arch packages can be used instead of
# the git submodules?
depends=('deoplete-git' 'python-jedi' 'python2-jedi')
makedepends=('git')
provides=('deoplete-jedi')
@ -34,9 +40,17 @@ prepare() {
}
package() {
if [ "$_neovim" = "y" ]; then
mkdir -p "$pkgdir/usr/share/nvim/runtime/rplugin/python3/deoplete"
cp -r "${srcdir}/${_name}/rplugin/python3/deoplete/sources" \
"$pkgdir/usr/share/nvim/runtime/rplugin/python3/deoplete/"
"$pkgdir/usr/share/nvim/runtime/rplugin/python3/deoplete/"
fi
if [ "$_vim" = "y" ]; then
mkdir -p "$pkgdir/usr/share/vim/vimfiles/rplugin/python3/deoplete"
cp -r "${srcdir}/${_name}/rplugin/python3/deoplete/sources" \
"$pkgdir/usr/share/vim/vimfiles/rplugin/python3/deoplete/"
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