Name neovim
Description Fork of Vim aiming to improve user experience, plugins, and GUIs
Version 0.11.6-1
Package Base neovim
Homepage https://neovim.io
Maintainers ['Caleb Maclennan <alerque@archlinux.org>', 'Caleb Maclennan <caleb@alerque.com>', 'Daniel M. Capella <polyzen@archlinux.org>', 'Sven-Hendrik Haase <svenstaro@archlinux.org>']
Contributors ['Florian Hahn <flo@fhahn.com>', 'Florian Walch <florian+aur@fwalch.com>']
Distro-repo https://gitlab.archlinux.org/archlinux/packaging/packages/neovim
Sources ['git+https://github.com/neovim/neovim.git#tag=v0.11.6', 'nvimdoc', 'nvimdoc.hook']
Dependencies ['libluv', 'libutf8proc', 'libuv', 'libvterm', 'lua51-lpeg', 'luajit', 'msgpack-c', 'tree-sitter', 'tree-sitter-c', 'tree-sitter-lua', 'tree-sitter-markdown', 'tree-sitter-query', 'tree-sitter-vim', 'tree-sitter-vimdoc', 'unibilium']
Optional-Dependencies ['python-pynvim', 'wl-clipboard', 'xclip', 'xsel']
Build-Dependencies ['cmake', 'git', 'ninja', 'lua51-mpack', 'lua51-lpeg']
Provides ['nvim', 'vim-plugin-runtime']
Builddate 26-01-2026 21:28:33
Architecture x86_64
Distro-Version
Licenses ['Apache-2.0', 'LicenseRef-vim']
Hash 7eeb457fdb39535978b41e86ccb64842e6df6570cf5302a4ffcc1f5e7e460270
# Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Maintainer: Daniel M. Capella <polyzen@archlinux.org>
# Contributor: Florian Walch <florian+aur@fwalch.com>
# Contributor: Florian Hahn <flo@fhahn.com>

pkgname=neovim
pkgver=0.11.6
pkgrel=1
pkgdesc='Fork of Vim aiming to improve user experience, plugins, and GUIs'
arch=(x86_64)
url=https://neovim.io
license=(
  Apache-2.0
  LicenseRef-vim
)
depends=(
  libluv
  libutf8proc
  libuv
  'libvterm>=0.3.3'
  lua51-lpeg
  luajit
  msgpack-c
  tree-sitter
  tree-sitter-c
  tree-sitter-lua
  tree-sitter-markdown
  tree-sitter-query
  tree-sitter-vim
  tree-sitter-vimdoc
  unibilium
)
makedepends=(
  cmake
  git
  ninja
  lua51-mpack
  lua51-lpeg
)
optdepends=(
  'python-pynvim: for Python plugin support (see :help python)'
  'xclip: for clipboard support on X11 (or xsel) (see :help clipboard)'
  'xsel: for clipboard support on X11 (or xclip) (see :help clipboard)'
  'wl-clipboard: for clipboard support on wayland (see :help clipboard)'
)
provides=(
  nvim
  vim-plugin-runtime
)
backup=(etc/xdg/nvim/sysinit.vim)
source=(
  "git+https://github.com/neovim/neovim.git#tag=v$pkgver"
  nvimdoc{,.hook}
)
sha512sums=('c5b5f441f1dd73e0d855c52c7e07b3787dc87d0a2590c1c5e9746a0d2adc9bd69edd98e361a61a5c24d26f12e6fa4dda6077608c982a751055d6bf5bf1a310f8'
            '22662462c823de243599cdd3483e46ade4ab59b219e907468d34c18e584fe7477548e357ee2ce56bb098cf54b770b108a3511703dd486f0774a65c84af78f6aa'
            '3c6ee1e4646d09c164a2212f9e4d2f53158ff32911b0972e060a395a8d4685334574a7ede995a81680dcc0750cd3327a78beb7904a4bb326b2399d79a8b12d5e')

build() {
  cd ${pkgname}
  cmake \
    -B build \
    -G Ninja \
    -D CMAKE_BUILD_TYPE=RelWithDebInfo \
    -D CMAKE_INSTALL_PREFIX=/usr \
    -D USE_BUNDLED=OFF \
    -D ENABLE_TRANSLATIONS=ON \
    -W no-dev
  cmake --build build --verbose
}

check() {
  cd ${pkgname}
  ./build/bin/nvim --version
  ./build/bin/nvim --headless -u NONE -i NONE +q
}

package() {
  install -Dm644 -t "${pkgdir}"/usr/share/libalpm/hooks/ nvimdoc.hook
  install -Dt "${pkgdir}"/usr/share/libalpm/scripts/ nvimdoc

  cd ${pkgname}
  DESTDIR="${pkgdir}" cmake --install build

  install -Dm644 LICENSE.txt -t "${pkgdir}"/usr/share/licenses/${pkgname}/
  install -Dm644 runtime/nvim.desktop -t "${pkgdir}"/usr/share/applications/
  install -Dm644 runtime/nvim.appdata.xml -t "${pkgdir}"/usr/share/metainfo/
  install -Dm644 runtime/nvim.png -t "${pkgdir}"/usr/share/pixmaps/

  # Tree-sitter grammars are packaged separately and installed into
  # /usr/lib/tree_sitter.
  ln -s /usr/lib/tree_sitter "${pkgdir}"/usr/share/nvim/runtime/parser

  # Include system-wide Vim directory in runtimepath
  mkdir -p "${pkgdir}"/etc/xdg/nvim
  echo 'source /usr/share/nvim/archlinux.lua' > "${pkgdir}"/etc/xdg/nvim/sysinit.vim

  mkdir -p "${pkgdir}"/usr/share/vim
  cat > "${pkgdir}"/usr/share/nvim/archlinux.lua << EOF
-- Modify runtimepath to also search the system-wide Vim directory
-- (eg. for Vim runtime files from Arch Linux packages)
vim.opt.runtimepath:append({ '/usr/share/vim/vimfiles', '/usr/share/vim/vimfiles/after' })
EOF
}