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

Error while opening files on Windows #2834

Closed
koppa96 opened this issue May 11, 2024 · 3 comments
Closed

Error while opening files on Windows #2834

koppa96 opened this issue May 11, 2024 · 3 comments

Comments

@koppa96
Copy link

koppa96 commented May 11, 2024

Describe the bug
When I try to save a file after a clean install of NvChad that already existed before opening neovim with :w, I get the following error message: E13: File exists (add ! to override).

If I open the file directly, instead of just running nvim, I get the following error message:

Error detected while processing BufReadPost Autocommands for "*":
Error executing lua callback: ...ti/nvim-win64/nvim-win64/share/nvim/runtime/filetype.lua:24: Error executing lua: ...ti/nvim-win64/nvim-win64/share/nvim/runtime/filetype.lua:25: BufReadPost Autocommands for "*"..FileType Autocommands for "*": Vim(append):Error executing lua callback: Failed to load parser for language 'lua': uv_dlopen: C:\Users\Peti\AppData\Local\nvim-data\lazy\nvim-treesitter\parser\lua.so is not a valid Win32 application.

stack traceback:
        [C]: in function '_ts_add_language'
        ...win64/share/nvim/runtime/lua/vim/treesitter/language.lua:98: in function 'add'
        ...4/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:98: in function 'new'
        ...n64/nvim-win64/share/nvim/runtime/lua/vim/treesitter.lua:61: in function '_create_parser'
        ...n64/nvim-win64/share/nvim/runtime/lua/vim/treesitter.lua:131: in function 'get_parser'
        ...n64/nvim-win64/share/nvim/runtime/lua/vim/treesitter.lua:460: in function 'start'
        ...a/lazy/nvim-treesitter/lua/nvim-treesitter/highlight.lua:20: 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'
        ...ti/nvim-win64/nvim-win64/share/nvim/runtime/filetype.lua:25: in function <...ti/nvim-win64/nvim-win64/share/nvim/runtime/filetype.lua:24>
        [C]: in function 'nvim_buf_call'
        ...ti/nvim-win64/nvim-win64/share/nvim/runtime/filetype.lua:24: in function <...ti/nvim-win64/nvim-win64/share/nvim/runtime/filetype.lua:10>
stack traceback:
        [C]: in function 'nvim_cmd'
        ...ti/nvim-win64/nvim-win64/share/nvim/runtime/filetype.lua:25: in function <...ti/nvim-win64/nvim-win64/share/nvim/runtime/filetype.lua:24>
        [C]: in function 'nvim_buf_call'
        ...ti/nvim-win64/nvim-win64/share/nvim/runtime/filetype.lua:24: in function <...ti/nvim-win64/nvim-win64/share/nvim/runtime/filetype.lua:10>
stack traceback:
        [C]: in function 'nvim_buf_call'
        ...ti/nvim-win64/nvim-win64/share/nvim/runtime/filetype.lua:24: in function <...ti/nvim-win64/nvim-win64/share/nvim/runtime/filetype.lua:10>

To Reproduce
Steps to reproduce the behavior:

  1. Install Neovim 0.9.5
  2. Follow the instructions in the installation tutorial. I used Powershell to install NvChad.
  3. Open a pre-existing lua file, eg. the init.lua file in your Neovim config folder.

Expected behavior

Screenshots
The output of :w:

image

The output of :f:
image

The error when I open the file directly:

image

Desktop (please complete the following information):

  • Windows 11 23H2 (Build nr. 22631.3447)
  • Terminal: Powershell
  • 0.9.5

Additional context

I have gcc and make installed and in the path.

image

@koppa96 koppa96 changed the title Error while opening files Error while opening files on Windows May 11, 2024
@siduck
Copy link
Member

siduck commented May 11, 2024

that doesnt look like a nvchad error. I suggest you to rm -rf all nvim dirs and reinstall nvchad. Also delete ~/.local/state/nvim , idk what that might be on windows tho! check by :echo stdpath("state")

@siduck siduck closed this as completed May 11, 2024
@koppa96
Copy link
Author

koppa96 commented May 11, 2024

If anyone faces an issue like this, see this: nvim-treesitter/nvim-treesitter#1985

I managed to make it work with zig, instead of gcc as compiler.

@siduck
Copy link
Member

siduck commented May 12, 2024

nice!

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

No branches or pull requests

2 participants