comfysage / evergarden

:rose: a comfy neovim colorscheme for cozy morning coding.
MIT License
122 stars 4 forks source link

[bug report] crash because of a missing `style.sign` override #8

Closed Picalines closed 3 months ago

Picalines commented 3 months ago

There's a change in the recent commit that introduced an issue. It assumes that there's a sign field in style configuration

https://github.com/comfysage/evergarden/blob/dddaf99b9ef16f7046710f905d819704bc0e5599/lua/evergarden/theme.lua#L83

which wasn't the case for my configuration:

opts = {
  transparent_background = false,
  contrast_dark = 'hard',
  override_terminal = true,
  style = {
      tabline = { reverse = true, color = 'green' },
      search = { reverse = false, inc_reverse = true },
      types = { italic = true },
      keyword = { italic = true },
      comment = { italic = true },
          -- no sign!
  },
  overrides = {},
},

and that's why I get the error:

E5113: Error while calling lua chunk: ...lua/evergarden/theme.lua:83: attempt to index field 'sign' (a nil value)

The solution is obviously to add the missing sign option. But it seems to me that at the plugin level, you can add a deep merge of configurations so that such problems do not arise

sidenote: one of the best color themes, thank you very much!

tan-wei commented 3 months ago

Met the same issue.

comfysage commented 3 months ago

you're absolutely right. seems i forgot to stash some changes before committing.

comfysage commented 3 months ago

should be fixed with 7e031b6 - sorry for the issues