commit: c0ab3c616987b055cf0240fb09aab33e2ee49ba7 Author: Violet Purcell <vimproved <AT> inventati <DOT> org> AuthorDate: Sat Jun 15 20:54:21 2024 +0000 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> CommitDate: Sat Jul 27 05:46:47 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0ab3c61
app-editors/neovim: depend on and symlink required treesitter parsers In 0.10.0, neovim made a small subset of tree-sitter parsers (bash, c, lua, python, query, vim, vimdoc) required and load automatically upon opening their respective filetypes. However, this change was missed and was not properly reflected in the 0.10.0 bump, leading to errors upon opening any file of those filetypes (includig running :help). Those parsers have now been added to tree, so this commit adds the correct dependencies and symlinks the parsers to their correct locations in /usr/share/nvim/runtime/parser. Closes: https://bugs.gentoo.org/933833 Signed-off-by: Violet Purcell <vimproved <AT> inventati.org> Closes: https://github.com/gentoo/gentoo/pull/37178 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> ...{neovim-9999.ebuild => neovim-0.10.0-r1.ebuild} | 22 ++++++++++++++++++---- app-editors/neovim/neovim-9999.ebuild | 15 +++++++++++++++ 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/app-editors/neovim/neovim-9999.ebuild b/app-editors/neovim/neovim-0.10.0-r1.ebuild similarity index 81% copy from app-editors/neovim/neovim-9999.ebuild copy to app-editors/neovim/neovim-0.10.0-r1.ebuild index c10fff1c4d66..399df8c4faf1 100644 --- a/app-editors/neovim/neovim-9999.ebuild +++ b/app-editors/neovim/neovim-0.10.0-r1.ebuild @@ -16,7 +16,7 @@ if [[ ${PV} == 9999 ]]; then EGIT_REPO_URI="https://github.com/neovim/neovim.git" else SRC_URI="https://github.com/neovim/neovim/archive/v${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86 ~x64-macos" + KEYWORDS="~amd64" fi LICENSE="Apache-2.0 vim" @@ -39,6 +39,7 @@ BDEPEND="${LUA_DEPS} " # Check https://github.com/neovim/neovim/blob/master/third-party/CMakeLists.txt for # new dependency bounds and so on on bumps (obviously adjust for right branch/tag). +# List of required tree-sitter parsers is taken from cmake.deps/deps.txt DEPEND="${LUA_DEPS} >=dev-lua/luv-1.45.0[${LUA_SINGLE_USEDEP}] $(lua_gen_cond_dep ' @@ -51,9 +52,16 @@ DEPEND="${LUA_DEPS} >=dev-libs/libuv-1.46.0:= >=dev-libs/libvterm-0.3.3 >=dev-libs/msgpack-3.0.0:= - >=dev-libs/tree-sitter-0.22.6:= + >=dev-libs/tree-sitter-0.20.9:= + =dev-libs/tree-sitter-bash-0.21* + =dev-libs/tree-sitter-c-0.21* + =dev-libs/tree-sitter-lua-0.1* + =dev-libs/tree-sitter-markdown-0.2* + =dev-libs/tree-sitter-python-0.21* + =dev-libs/tree-sitter-query-0.3* + =dev-libs/tree-sitter-vim-0.4* + =dev-libs/tree-sitter-vimdoc-2* >=dev-libs/unibilium-2.0.0:0= - >=dev-libs/libutf8proc-2.9.0:= " RDEPEND=" ${DEPEND} @@ -97,7 +105,13 @@ src_install() { # install a default configuration file insinto /etc/vim - newins "${FILESDIR}"/sysinit.vim-r1 sysinit.vim + doins "${FILESDIR}"/sysinit.vim + + # symlink tree-sitter parsers + dodir /usr/share/nvim/runtime + for parser in bash c lua markdown python query vim vimdoc; do + dosym ../../../../$(get_libdir)/libtree-sitter-${parser}.so /usr/share/nvim/runtime/parser/${parser}.so + done # conditionally install a symlink for nvimpager if use nvimpager; then diff --git a/app-editors/neovim/neovim-9999.ebuild b/app-editors/neovim/neovim-9999.ebuild index c10fff1c4d66..e2bab5a8ceb9 100644 --- a/app-editors/neovim/neovim-9999.ebuild +++ b/app-editors/neovim/neovim-9999.ebuild @@ -39,6 +39,7 @@ BDEPEND="${LUA_DEPS} " # Check https://github.com/neovim/neovim/blob/master/third-party/CMakeLists.txt for # new dependency bounds and so on on bumps (obviously adjust for right branch/tag). +# List of required tree-sitter parsers is taken from cmake.deps/deps.txt DEPEND="${LUA_DEPS} >=dev-lua/luv-1.45.0[${LUA_SINGLE_USEDEP}] $(lua_gen_cond_dep ' @@ -52,6 +53,14 @@ DEPEND="${LUA_DEPS} >=dev-libs/libvterm-0.3.3 >=dev-libs/msgpack-3.0.0:= >=dev-libs/tree-sitter-0.22.6:= + =dev-libs/tree-sitter-bash-0.21* + =dev-libs/tree-sitter-c-0.21* + =dev-libs/tree-sitter-lua-0.1* + =dev-libs/tree-sitter-markdown-0.2* + =dev-libs/tree-sitter-python-0.21* + =dev-libs/tree-sitter-query-0.3* + =dev-libs/tree-sitter-vim-0.4* + =dev-libs/tree-sitter-vimdoc-2* >=dev-libs/unibilium-2.0.0:0= >=dev-libs/libutf8proc-2.9.0:= " @@ -99,6 +108,12 @@ src_install() { insinto /etc/vim newins "${FILESDIR}"/sysinit.vim-r1 sysinit.vim + # symlink tree-sitter parsers + dodir /usr/share/nvim/runtime + for parser in bash c lua markdown python query vim vimdoc; do + dosym ../../../../$(get_libdir)/libtree-sitter-${parser}.so /usr/share/nvim/runtime/parser/${parser}.so + done + # conditionally install a symlink for nvimpager if use nvimpager; then dosym ../share/nvim/runtime/macros/less.sh /usr/bin/nvimpager
