neovim icon indicating copy to clipboard operation
neovim copied to clipboard

No mention of treesitter parsers as dependencies when Nvim is built with USE_BUNDLED=OFF

Open zeertzjq opened this issue 2 years ago • 5 comments

Problem

No mention of treesitter parsers as dependencies when Nvim is built with USE_BUNDLED=OFF

Steps to reproduce

  1. Build Nvim with make USE_BUNDLED=OFF
  2. Install Nvim with sudo make install USE_BUNDLED=OFF
  3. Run nvim --clean
  4. Run :h
  5. E5108: Error executing lua /usr/share/nvim/runtime/lua/vim/treesitter/language.lua:98: no parser for 'vimdoc' language, see :help treesitter-parsers

Expected behavior

Either of the following two:

Neovim version (nvim -v)

v0.10.0-dev-1746+g5651c1ff2

Vim (not Nvim) behaves the same?

N/A

Operating system/version

Arch Linux

Terminal name/version

kitty 0.31.0

$TERM environment variable

xterm-kitty

Installation

See above

zeertzjq avatar Dec 04 '23 05:12 zeertzjq

No error when opening a help file when Nvim is built with USE_BUNDLED=OFF and vimdoc parser is not available

There's no good way to transfer this information to the main build because it's supposed to be separate. The best hack is probably just checking if parsers exists in bundled location in main script. Even that is undesirable as that propagates the "different builds" think from vim.

The second is more reasonable IMO.

Related: https://github.com/neovim/neovim/pull/22923

dundargoc avatar Dec 04 '23 10:12 dundargoc

It can also be just a pcall() :)

zeertzjq avatar Dec 04 '23 10:12 zeertzjq

Oh, you mean handling it in runtime? Hmm, yeah, could work I guess.

dundargoc avatar Dec 04 '23 10:12 dundargoc

No. Treesitter parsers are required, and an installation without them is broken, same as the Lua runtime. I don't want to paper over a broken installation; this will only lead to messy bug reports.

We need to decide how to handle missing runtime dependencies (even when they now include binaries). Currently, that is checkhealth. Clear messaging in our build instructions also never hurts.

clason avatar Dec 04 '23 10:12 clason

It appears that the neovim-ppa/unstable build has this issue, too. Just in case anyone else is seeing the same, I installed https://github.com/nvim-treesitter/nvim-treesitter and included vimdoc in "ensure_installed" and that seemed to address it.

djmitche avatar Dec 09 '23 15:12 djmitche