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 BufReadPost Autocommands after git commit command #1050

Closed
jrmejiaa opened this issue Jul 25, 2024 · 3 comments
Closed

Error BufReadPost Autocommands after git commit command #1050

jrmejiaa opened this issue Jul 25, 2024 · 3 comments

Comments

@jrmejiaa
Copy link

jrmejiaa commented Jul 25, 2024

Describe the bug

Hi devs,

I am using the last version commit 56b9114 with Neovim v0.10.1. I got the following error after trying to commit a change in my git

# git commit
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: BufReadPost Autocommands for "*"..FileType Autocommands for "*": Vim(append):Error executing lua callback: ...eesitter/lua/nvim-treesitte
r/shell_command_selectors.lua:308: bad argument #3 to 'format' (value expected)
stack traceback:
        [C]: in function 'format'
        ...eesitter/lua/nvim-treesitter/shell_command_selectors.lua:308: in function 'select_download_commands'
        ...vim/lazy/nvim-treesitter/lua/nvim-treesitter/install.lua:406: in function 'run_install'
        ...vim/lazy/nvim-treesitter/lua/nvim-treesitter/install.lua:495: in function 'install_lang'
        ...vim/lazy/nvim-treesitter/lua/nvim-treesitter/install.lua:552: in function <...vim/lazy/nvim-treesitter/lua/nvim-treesitter/install.lua:514>
        ...vim/lazy/nvim-treesitter/lua/nvim-treesitter/install.lua:564: in function <...vim/lazy/nvim-treesitter/lua/nvim-treesitter/install.lua:561>
        [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>

To Reproduce

  • Set nvim as default editor in your shell
  • Try to make a commit in any repository with the command git commit (without -m flag)
  • Got error

Desktop

  • OS: Debian 12
  • Terminal: zsh 5.9 (x86_64-debian-linux-gnu)

Neovim Version

NVIM v0.10.1
Build type: Release
LuaJIT 2.1.1713484068
@jrmejiaa
Copy link
Author

This was a problem of nvim-treesitter, this issue helped me nvim-treesitter/nvim-treesitter#5353

If I run the command :TSInstall gitcommit. I don't get the error. Is it well known this behavior?

@iton0
Copy link
Contributor

iton0 commented Jul 29, 2024

I believe this issue is being addressed in #1061

@feoh
Copy link
Collaborator

feoh commented Jul 30, 2024

Just merged that PR. Closing.

@feoh feoh closed this as completed Jul 30, 2024
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

3 participants