Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 May 2024 02:14:40 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 279359] editors/neovim: error when opening lua code
Message-ID:  <bug-279359-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D279359

            Bug ID: 279359
           Summary: editors/neovim: error when opening lua code
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: adamw@FreeBSD.org
          Reporter: markj@FreeBSD.org
          Assignee: adamw@FreeBSD.org
             Flags: maintainer-feedback?(adamw@FreeBSD.org)

After the recent update to 0.10.0, I get an annoying error when opening lua
code.

In a freshly installed VM with no config, if I run `echo 'print("hello,
world")' > test.lua` and then run `nvim test.lua`, I'm greeted with:

---
Error detected while processing BufReadPost Autocommands for "*":
Error executing lua callback: /usr/local/share/nvim/runtime/filetype.lua:35:
Error executing lua: /usr/local/share/nvim/runtime/filetype.lua:36: BufRead=
Post
Au
tocommands for "*"..FileType Autocommands for "*"..function
<SNR>1_LoadFTPlugin[20]..script /usr/local/share/nvim/runtime/ftplugin/lua.=
lua:
Vim(runtime):E5113:
 Error while calling lua chunk:
...local/share/nvim/runtime/lua/vim/treesitter/language.lua:107: no parser =
for
'lua' language, see :help treesitter-parsers
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'
        /usr/local/share/nvim/runtime/lua/vim/treesitter.lua:41: in function
'_create_parser'
        /usr/local/share/nvim/runtime/lua/vim/treesitter.lua:108: in functi=
on
'get_parser'
        /usr/local/share/nvim/runtime/lua/vim/treesitter.lua:416: in functi=
on
'start'
        /usr/local/share/nvim/runtime/ftplugin/lua.lua:2: in main chunk
        [C]: in function 'nvim_cmd'
        /usr/local/share/nvim/runtime/filetype.lua:36: in function
</usr/local/share/nvim/runtime/filetype.lua:35>
        [C]: in function 'nvim_buf_call'
        /usr/local/share/nvim/runtime/filetype.lua:35: in function
</usr/local/share/nvim/runtime/filetype.lua:10>
stack traceback:
        [C]: in function 'nvim_cmd'
        /usr/local/share/nvim/runtime/filetype.lua:36: in function
</usr/local/share/nvim/runtime/filetype.lua:35>
        [C]: in function 'nvim_buf_call'
        /usr/local/share/nvim/runtime/filetype.lua:35: in function
</usr/local/share/nvim/runtime/filetype.lua:10>
stack traceback:
        [C]: in function 'nvim_buf_call'
        /usr/local/share/nvim/runtime/filetype.lua:35: in function
</usr/local/share/nvim/runtime/filetype.lua:10>
---

The code at the top of the stack is this:

    local fname =3D 'parser/' .. lang .. '.*'
    local paths =3D api.nvim_get_runtime_file(fname, false)
    if #paths =3D=3D 0 then
      error("no parser for '" .. lang .. "' language, see :help
treesitter-parsers")
    end
    path =3D paths[1]

but there's no directory called "parser" in the runtime path.  I suspect th=
at
there are some new files not included in the neovim package.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-279359-7788>