pwntester / octo.nvim

Edit and review GitHub issues and pull requests from the comfort of your favorite editor
MIT License
2.24k stars 124 forks source link

Error when trying to compare .sh file in review panel #455

Open proivk opened 7 months ago

proivk commented 7 months ago

Issue Description

Type: bug report

Error appears when open .sh file in review panel

E5108: Error executing lua: ...ack/packer/opt/octo.nvim/lua/octo/reviews/file-entry.lua:261: BufReadPost Autocommands for "*": Vim(lua):E5108: Error executing lua vim/_editor.lua:0: BufReadPost Autocommands for "*"..script nvim_exec2() called at BufReadPos
t Autocommands for "*":0: Vim(call):E117: Unknown function: dist#ft#SetFileTypeSH
stack traceback:
        [C]: in function 'nvim_exec2'
        vim/_editor.lua: in function 'cmd'
        ...r/start/filetype.nvim/lua/filetype/mappings/function.lua:391: in function 'name'
        ...te/pack/packer/start/filetype.nvim/lua/filetype/init.lua:17: in function 'set_filetype'
        ...te/pack/packer/start/filetype.nvim/lua/filetype/init.lua:65: in function 'try_lookup'
        ...te/pack/packer/start/filetype.nvim/lua/filetype/init.lua:168: in function 'resolve'
        [string ":lua"]:1: in main chunk
        [C]: in function 'nvim_win_set_buf'
        ...ack/packer/opt/octo.nvim/lua/octo/reviews/file-entry.lua:261: in function 'load_buffers'
        ...te/pack/packer/opt/octo.nvim/lua/octo/reviews/layout.lua:116: in function 'set_file'
        ...vim/site/pack/packer/opt/octo.nvim/lua/octo/mappings.lua:132: in function <...vim/site/pack/packer/opt/octo.nvim/lua/octo/mappings.lua:126>
stack traceback:
        [C]: in function 'nvim_win_set_buf'
        ...ack/packer/opt/octo.nvim/lua/octo/reviews/file-entry.lua:261: in function 'load_buffers'
        ...te/pack/packer/opt/octo.nvim/lua/octo/reviews/layout.lua:116: in function 'set_file'
        ...vim/site/pack/packer/opt/octo.nvim/lua/octo/mappings.lua:132: in function <...vim/site/pack/packer/opt/octo.nvim/lua/octo/mappings.lua:126>

Describe what happened (or what feature you want)

  1. GoLang project on GitHub
  2. There is a PR with one new .sh file that was added to the project
  3. When I open .sh file in review panel, error appears

Describe what you expected to happen

Diff view is displayed correctly for .sh file

How to reproduce it (as minimally and precisely as possible)

  1. GoLang project on github
  2. As part of one activity .sh file was added to the code\
  3. Octo pr list, select required PR and open it
  4. Octo review start
  5. Select .sh file in file panel and hit Enter
  6. Error above is appeared instead of file diff

Tell us your environment

NVIM v0.9.1 Build type: Release LuaJIT 2.1.0-beta3 iTerm2 tmux 3.3a

Anything else we need to know?