lewis6991 / gitsigns.nvim

Git integration for buffers
MIT License
5.14k stars 190 forks source link

Error executing ...e/pack/packer/start/gitsigns.nvim/lua/gitsigns/popup.lua:23: Buffer is not 'modifiable' #278

Closed ttys3 closed 3 years ago

ttys3 commented 3 years ago

Describe the bug

nvim -M any-file-under-git-repo.txt, then try the current line blamer, got the error:

Error executing vim.schedule lua callback: ...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:14: The coroutine failed with this message: ...e/pack/packer/start/gitsigns.nvim/lua/gitsigns/popup.lua:23: Buffer is not 'modifiable'

To Reproduce

init.vim:

let $PLUGIN_DIRECTORY = '~/.config/nvim/bundle'
set runtimepath^=$PLUGIN_DIRECTORY/plenary.nvim
set runtimepath^=$PLUGIN_DIRECTORY/gitsigns.nvim

lua << EOF
require('gitsigns').setup {
  debug_mode = true, -- You must add this to enable debug messages
  -- config
}
EOF

Steps to reproduce the behavior:

nvim -M any-file-under-git-repo.txt, then try the current line blamer, got the error:

Observed output

Error executing vim.schedule lua callback: ...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:14: The coroutine failed with this message: ...e/pack/packer/start/gitsigns.nvim/lua/gitsigns/popup.lua:23: Buffer is not 'modifiable'

:Gitsigns debug_messages got not message

Screenshots If applicable, add screenshots to help explain your problem or to capture error messages.

image

Additional context System: Linux Ubuntu 21.04 (Hirsute Hippo) Neovim version: v0.6.0-dev+61-g6f48c018b

lewis6991 commented 3 years ago

then try the current line blamer

What do you mean by this. Please be more specific.

lewis6991 commented 3 years ago

And why are you passing -M?