Repository: nvim-lua/kickstart.nvim

Issue #236: Windows 11: Error after installation when opening a cpp file
Created: 2023-03-29T17:41:59Z
Describe the bug
Open a cpp file, then the following error message is shown:
Fehler beim Ausführen von "function 41_NetrwBrowseChgDir[197]..BufReadPost Autokommandos für """:
Error executing lua callback: C:/Program Files/Neovim/share/nvim/runtime/filetype.lua:21: Error executing lua: C:/Program Files/Neovim/share/nvim/runtime/filetype.lua:22: function 41_NetrwBrowseChgDir[197]..BufReadPost Autokommandos für ""..FileType Autokommandos für "*": Vim(append):Error executing lua callback: Failed to load parser for language 'cpp': uv_dlopen: C:\Users\henz\AppData\Local\nvim-data\lazy\nvim-treesitter\parser\cpp.so is not a valid Win32 application.
stack traceback:
[C]: in function '_ts_add_language'
...eovim/share/nvim/runtime/lua/vim/treesitter/language.lua:92: in function 'add'
...s/Neovim/share/nvim/runtime/lua/vim/treesitter/query.lua:255: in function 'get_query'
...-data/lazy/nvim-treesitter/lua/nvim-treesitter/query.lua:108: in function 'get_query'
...r-textobjects/lua/nvim-treesitter/textobjects/shared.lua:98: in function 'available_textobjects'
...r-textobjects/lua/nvim-treesitter/textobjects/select.lua:172: in function 'attach'
...ata/lazy/nvim-treesitter/lua/nvim-treesitter/configs.lua:509: in function 'attach_module'
...ata/lazy/nvim-treesitter/lua/nvim-treesitter/configs.lua:532: in function 'reattach_module'
...ata/lazy/nvim-treesitter/lua/nvim-treesitter/configs.lua:133: in function <...ata/lazy/nvim-treesitter/lua/nvim-treesitter/configs.lua:132>
[C]: in function 'nvim_cmd'
C:/Program Files/Neovim/share/nvim/runtime/filetype.lua:22: in function <C:/Program Files/Neovim/share/nvim/runtime/filetype.lua:21>
[C]: in function 'nvim_buf_call'
C:/Program Files/Neovim/share/nvim/runtime/filetype.lua:21: in function <C:/Program Files/Neovim/share/nvim/runtime/filetype.lua:10>
stack traceback:
[C]: in function 'nvim_cmd'
C:/Program Files/Neovim/share/nvim/runtime/filetype.lua:22: in function <C:/Program Files/Neovim/share/nvim/runtime/filetype.lua:21>
[C]: in function 'nvim_buf_call'
C:/Program Files/Neovim/share/nvim/runtime/filetype.lua:21: in function <C:/Program Files/Neovim/share/nvim/runtime/filetype.lua:10>
stack traceback:
[C]: in function 'nvim_buf_call'
To Reproduce
Steps to reproduce the behavior:

After installation open any cpp file


Initial installation passed without any errors after the first start of nvim from within a "Developer Poweshell for VS 2022".

Desktop (please complete the following information):

OS: Windows 11 22H2 (Build 22621.1413)
Terminal: Windows Terminal

** Neovim Version **
NVIM v0.9.0-dev-1175+g89a525de9
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe /MD /Zi /O2 /Ob1  -W3 -wd4311 -wd4146 -DUNIT_TESTING -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_WIN32_WINNT=0x0602 -DMSWIN -DINCLUDE_GENERATED_DECLARATIONS -ID:/a/neovim/neovim/.deps/usr/include/luajit-2.1 -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/build/src/nvim/auto -ID:/a/neovim/neovim/build/include -ID:/a/neovim/neovim/build/cmake.config -ID:/a/neovim/neovim/src -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include
      System-vimrc-Datei: "$VIM\sysinit.vim"
 Voreinstellung für $VIM: "C:/Program Files (x86)/nvim/share/nvim"

Run :checkhealth for more info

Duplicate issue #322: nvim-treesitter Shows error when launching nvim for the first time.
Created: 2023-05-25T12:43:27Z
Error
Error detected while processing BufReadPost Autocommands for "*":
Error executing lua callback: C:/Program Files/Neovim/share/nvim/runtime/filetype.lua:22: Error executing lua: C:/Program Files/Neovim/share/nvim/runtime/filetype.lua:23: Vim(append):Error executing lua callback: Failed to load parser: uv_dlopen: C:\Users\stanp\AppData\Local\nvim-data\lazy\nvim-treesitter\parser\lua.so is not a valid Win32 application.

Description
For those who will gonna say that I have to go through Nvim-treesitter official Windows Support. I did that. I also went through troubleshooting. Now, The thing is that I have 0 knowledge of Lua and no fucking knowledge on how to use it.

I was able to get past step 1, but not past of second step which is adding that line. I know that my init.lua file is in the nvim directory on windows.
My directory structure is as follows;
├── nvim
│   └── init.lua
└── nvim-data
    └── lazy
        └── nvim-treesitter
            └── lua
                └── nvim-treesitter
                    └── install.lua

Line I want to add and which is also not working:
require 'nvim-treesitter.install'.compilers = { "clang" }
The above one shows an import error or Unable to load the lua file. Please help me as I am really stuck here even after ChatGPT'ing.

Closing comment (2023-05-25T13:47:53Z): This is a duplicate of #236. Closing.