pwntester / octo.nvim

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

Bug: Invalid character in group name when trying to add review comment #366

Closed minaeakhalil closed 1 year ago

minaeakhalil commented 1 year ago

Issue Description

Type: bug report

Describe what happened (or what feature you want)

Every time I attempt to add a comment I receive this error:

Error detected while processing CursorHold Autocommands for "*":
E5248: Invalid character in group name
Error executing lua callback: ....local/share/lunarvim/lvim/lua/lvim/core/breadcrumbs.lua:107: Invalid highlight name: FileIconColorjson:11
stack traceback:
        [C]: in function 'nvim_set_hl'
        ....local/share/lunarvim/lvim/lua/lvim/core/breadcrumbs.lua:107: in function 'get_filename'
        ....local/share/lunarvim/lvim/lua/lvim/core/breadcrumbs.lua:172: in function 'get_winbar'
        ....local/share/lunarvim/lvim/lua/lvim/core/breadcrumbs.lua:218: in function <....local/share/lunarvim/lvim/lua/lvim/core/breadcrumbs.lua:213>

Describe what you expected to happen

I would expect to add review comment without receiving this error.

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

  1. Octo pr edit
  2. Octo review start
  3. Navigate to a change to comment on
  4. Hit <leader>ca to add a comment
  5. Error indicated above appears
  6. It goes away when you press any character, but keeps showing up with any character I type
  7. If i disable breadcrumbs, this error never shows up

Tell us your environment

  1. LunarVim (current stable version)

Anything else we need to know?

  1. I've disabled all non-core plugins to LunarVim and issue persisted
  2. It only disappears when I add this line to the config
    lvim.builtin.breadcrumbs.active = false

I wanted to thank you for your amazing plugin, I use it on a daily basis since the last 6 months or so.

pwntester commented 1 year ago

Hi, thanks for using Octo and for the feedback. This seems to be a problem with Lunarvim. Probably they are trying to get the filename for the octo buffer, but there is no filesystem file backing up an octo buffer. They should account for this kind of buffer (if they are not doing so already). The lines referenced in your error (eg: 107 for get_filename) dont seemt to match with the latest file. So I would suggest that you try upgrading lunarvim first.

pwntester commented 1 year ago

Also check https://github.com/pwntester/octo.nvim/discussions/355

minaeakhalil commented 1 year ago

Thanks @pwntester . Appreciate your prompt and thoughtful feedback.

I can confirm that having the latest nightly version of LunarVim (c18cd3f0) fixes the issue and it has nothing to do with Octo.

Again thanks for the help and for your effort with this plugin.