Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

neovim creates wrong directory for parsers #23261

Open
2 of 6 tasks
dominicattal opened this issue Feb 1, 2025 · 1 comment
Open
2 of 6 tasks

neovim creates wrong directory for parsers #23261

dominicattal opened this issue Feb 1, 2025 · 1 comment
Labels

Comments

@dominicattal
Copy link

dominicattal commented Feb 1, 2025

Description / Steps to reproduce the issue

After installing neovim using pacman -S mingw-w64-ucrt-x86_64-neovim, whenever I tried to open a help page with :h, I would get this error message:

Error detected while processing BufNewFile Autocommands for "*":
Error executing lua callback: ...pData\Local\msys2\ucrt64\share\nvim\runtime\filetype.lua:35: Error executing lua: ...pData\Local\msys2\ucrt64\share\nvim\runt
ime\filetype.lua:36: BufNewFile Autocommands for "*"..FileType Autocommands for "*"..function <SNR>1_LoadFTPlugin[20]..script C:\Users\attal\AppData\Local\msy
s2\ucrt64\share\nvim\runtime\ftplugin\lua.lua: Vim(runtime):E5113: Error while calling lua chunk: ...crt64\share\nvim\runtime/lua/vim/treesitter/language.lua:
107: no parser for 'lua' language, see :help treesitter-parsers
stack traceback:
        [C]: in function 'error'
        ...crt64\share\nvim\runtime/lua/vim/treesitter/language.lua:107: in function 'add'
        ...4\share\nvim\runtime/lua/vim/treesitter/languagetree.lua:111: in function 'new'
        ...l\msys2\ucrt64\share\nvim\runtime/lua/vim/treesitter.lua:41: in function '_create_parser'
        ...l\msys2\ucrt64\share\nvim\runtime/lua/vim/treesitter.lua:108: in function 'get_parser'
        ...l\msys2\ucrt64\share\nvim\runtime/lua/vim/treesitter.lua:416: in function 'start'
        ...a\Local\msys2\ucrt64\share\nvim\runtime\ftplugin\lua.lua:2: in main chunk
        [C]: in function 'nvim_cmd'
        ...pData\Local\msys2\ucrt64\share\nvim\runtime\filetype.lua:36: in function <...pData\Local\msys2\ucrt64\share\nvim\runtime\filetype.lua:35>
        [C]: in function 'nvim_buf_call'
        ...pData\Local\msys2\ucrt64\share\nvim\runtime\filetype.lua:35: in function <...pData\Local\msys2\ucrt64\share\nvim\runtime\filetype.lua:10>
stack traceback:
        [C]: in function 'nvim_cmd'
        ...pData\Local\msys2\ucrt64\share\nvim\runtime\filetype.lua:36: in function <...pData\Local\msys2\ucrt64\share\nvim\runtime\filetype.lua:35>
        [C]: in function 'nvim_buf_call'
        ...pData\Local\msys2\ucrt64\share\nvim\runtime\filetype.lua:35: in function <...pData\Local\msys2\ucrt64\share\nvim\runtime\filetype.lua:10>
stack traceback:
        [C]: in function 'nvim_buf_call'
        ...pData\Local\msys2\ucrt64\share\nvim\runtime\filetype.lua:35: in function <...pData\Local\msys2\ucrt64\share\nvim\runtime\filetype.lua:10>

Upon further inspection, I found that the package is downloading a directory parsers instead of parser at /ucrt64/share/nvim/runtime, as indicated by the nvim documentation for treesitter-parsers:

Parsers are searched for as parser/{lang}.* in any 'runtimepath' directory.
If multiple parsers for the same language are found, the first one is used.
(NOTE: This typically implies the priority "user config > plugins > bundled".)

Renaming the directory to parser seemed to fix the issue.

Expected behavior

Using pacman -S mingw-w64-ucrt-x86_64-neovim to install neovim should create a parser directory in the runtime directory

Actual behavior

Using pacman -S mingw-w64-ucrt-x86_64-neovim creates a directory parsers instead of parser in the runtime directory

Verification

Windows Version

MINGW64_NT-10.0-22000

MINGW environments affected

  • MINGW64
  • MINGW32
  • UCRT64
  • CLANG64
  • CLANGARM64

Are you willing to submit a PR?

Yes

@lazka
Copy link
Member

lazka commented Feb 2, 2025

The package does not contain such a directory, so I wonder where it is coming from

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants