[MacPorts] #70072: neovim 0.10.0: missing tree-sitter parsers

MacPorts noreply at macports.org
Fri May 24 18:44:11 UTC 2024


#70072: neovim 0.10.0: missing tree-sitter parsers
-------------------------+--------------------
 Reporter:  thestr4ng3r  |      Owner:  (none)
     Type:  defect       |     Status:  new
 Priority:  Normal       |  Milestone:
Component:  ports        |    Version:  2.9.3
 Keywords:               |       Port:  neovim
-------------------------+--------------------
 As of 0.10.0, neovim assumes a couple of bundled tree-sitter parsers to be
 installed in the prefix under `/lib/nvim/parser`:
 {{{
 $ ls (...)/lib/nvim/parser/
 bash.so                 lua.so                  markdown_inline.so
 query.so                vimdoc.so
 c.so                    markdown.so             python.so
 vim.so
 }}}

 This is currently not the case with the port and thus neovim reports
 errors like these when opening e.g. `:help`:
 {{{
 Error detected while processing BufReadPost Autocommands for "*":
 Error executing lua callback:
 /opt/local/share/nvim/runtime/filetype.lua:35: Error executing lua:
 /opt/local/share/nvim/runtime/filetype.lua:36: BufReadPost A
 utocommands for "*"..FileType Autocommands for "*"..function
 <SNR>1_LoadFTPlugin[20]..script
 /opt/local/share/nvim/runtime/ftplugin/help.lua: Vim(runtime):E51
 13: Error while calling lua chunk:
 ...local/share/nvim/runtime/lua/vim/treesitter/language.lua:107: no parser
 for 'vimdoc' language, see :help treesitter-pars
 ers
 stack traceback:
         [C]: in function 'error'
         ...local/share/nvim/runtime/lua/vim/treesitter/language.lua:107:
 in function 'add'
         ...l/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:111:
 in function 'new'
         /opt/local/share/nvim/runtime/lua/vim/treesitter.lua:41: in
 function '_create_parser'
         /opt/local/share/nvim/runtime/lua/vim/treesitter.lua:108: in
 function 'get_parser'
         /opt/local/share/nvim/runtime/lua/vim/treesitter.lua:416: in
 function 'start'
         /opt/local/share/nvim/runtime/ftplugin/help.lua:2: in main chunk
         [C]: in function 'nvim_cmd'
         /opt/local/share/nvim/runtime/filetype.lua:36: in function
 </opt/local/share/nvim/runtime/filetype.lua:35>
         [C]: in function 'nvim_buf_call'
         /opt/local/share/nvim/runtime/filetype.lua:35: in function
 </opt/local/share/nvim/runtime/filetype.lua:10>
 stack traceback:
         [C]: in function 'nvim_cmd'
         /opt/local/share/nvim/runtime/filetype.lua:36: in function
 </opt/local/share/nvim/runtime/filetype.lua:35>
         [C]: in function 'nvim_buf_call'
         /opt/local/share/nvim/runtime/filetype.lua:35: in function
 </opt/local/share/nvim/runtime/filetype.lua:10>
 stack traceback:
         [C]: in function 'nvim_buf_call'
         /opt/local/share/nvim/runtime/filetype.lua:35: in function
 </opt/local/share/nvim/runtime/filetype.lua:10>
 }}}

 Upstream instructions about the parsers is here:
 https://github.com/neovim/neovim/blob/master/BUILD.md#how-to-build-
 without-bundled-dependencies
 > If treesitter parsers are not bundled, they need to be available in a
 parser/ runtime directory (e.g. /usr/share/nvim/runtime/parser/).

 As suggested there, the parsers can be built and made to be installed
 during the actual neovim build by running something like the following
 before the configure phase, in order to only bundle the tree-sitter
 parsers but no other dependencies:
 {{{
 cmake -S cmake.deps -B .deps -G "Unix Makefiles" -D
 CMAKE_BUILD_TYPE=Release -DUSE_BUNDLED=OFF -DUSE_BUNDLED_TS_PARSERS=ON
 cmake --build .deps
 # now build neovim itself
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/70072>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list