nvimdev / dashboard-nvim

vim dashboard

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot open neovim with a command only

vitorf7 opened this issue · comments

Describe the bug
I am using LazyVim and I have Octo installed and now that I am using dashboard-nvim I am no longer able to open my Octo to edit PRs from the command line with nvim -c ":Octo edit pr 1234.

I tried using alpha again and it works, when I use dashboard-nvim it does not work. However, if I pass a file to it like nvim -c ":Octo edit pr 1234" go.mod for example, then it opens that file and also the Octo PR edit screen.

To Reproduce
Steps to reproduce the behavior if you have octo:

  1. Go to terminal
  2. Type in something like nvim -c ":Octo edit pr 1234"
  3. You will get the following message
OctoEditable   xxx cleared
Press ENTER or type command to continue

Error executing vim.schedule lua callback: ...share/nvim/lazy/octo.nvim/lua/octo/model/octo-buffer.lua:77: Buffer is not 'modifiable'
stack traceback:
        [C]: in function 'nvim_buf_set_lines'
        ...share/nvim/lazy/octo.nvim/lua/octo/model/octo-buffer.lua:77: in function 'clear'
        ...share/nvim/lazy/octo.nvim/lua/octo/model/octo-buffer.lua:99: in function 'render_issue'
        ...iante/.local/share/nvim/lazy/octo.nvim/lua/octo/init.lua:246: in function 'create_buffer'
        ...iante/.local/share/nvim/lazy/octo.nvim/lua/octo/init.lua:82: in function 'cb'
        ...iante/.local/share/nvim/lazy/octo.nvim/lua/octo/init.lua:107: in function 'cb'
        ...te/.local/share/nvim/lazy/octo.nvim/lua/octo/gh/init.lua:119: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>
  1. try again doing :Octo pr edit 1234 and you get:
   Error  15:57:43 msg_show.lua_error   Octo pr edit 58 Error detected while processing CursorMoved Autocommands for "<buffer=1>":
15:57:43 msg_show   Octo pr edit 58 Error executing lua callback: ...re/nvim/lazy/dashboard-nvim/lua/dashboard/theme/doom.lua:132: Cursor position outside buffer
stack traceback:
	[C]: in function 'nvim_win_set_cursor'
	...re/nvim/lazy/dashboard-nvim/lua/dashboard/theme/doom.lua:132: in function <...re/nvim/lazy/dashboard-nvim/lua/dashboard/theme/doom.lua:122>
   Error  15:57:44 msg_show.lua_error Error executing vim.schedule lua callback: ...share/nvim/lazy/octo.nvim/lua/octo/model/octo-buffer.lua:77: Buffer is not 'modifiable'
stack traceback:
	[C]: in function 'nvim_buf_set_lines'
	...share/nvim/lazy/octo.nvim/lua/octo/model/octo-buffer.lua:77: in function 'clear'
	...share/nvim/lazy/octo.nvim/lua/octo/model/octo-buffer.lua:99: in function 'render_issue'
	...iante/.local/share/nvim/lazy/octo.nvim/lua/octo/init.lua:246: in function 'create_buffer'
	...iante/.local/share/nvim/lazy/octo.nvim/lua/octo/init.lua:82: in function 'cb'
	...iante/.local/share/nvim/lazy/octo.nvim/lua/octo/init.lua:107: in function 'cb'
	...te/.local/share/nvim/lazy/octo.nvim/lua/octo/gh/init.lua:119: in function ''
	vim/_editor.lua: in function <vim/_editor.lua:0>
  1. Close neovim
  2. Open with nvim -c ":Octo edit pr 1234" somefile.lua
  3. You should get the octo edit PR screen

Steps to reproduce with only Telescope

  1. Open terminal
  2. Run nvim -c ":Telescope find_files"
  3. You get the popup but nothing appears and if you type anything it says it is not modifiable

Expected behavior
Should be able to just open the Octo edit PR screen as normal or the find_files in telescope without a problem.

I had created a discussion on LazyVim (LazyVim/LazyVim#1804) repo but it seems that issue is probably not in LazyVim but in dashboard-nvim

Screenshots
If applicable, add screenshots to help explain your problem.