Oni: Prettier plugin statusline item highlighted weirdly

Created on 1 May 2018  路  9Comments  路  Source: onivim/oni

Using the neodark theme with dark background.

screenshot from 2018-04-30 20-56-22

It used to work without problems before 0.3.3

bug insider

Most helpful comment

I think a good workaround would be to use the same derived theme colors that the language server status tab uses, at least that way it would be consistent.

All 9 comments

I'm having the same but with a different theme (base16-nord).

@badosu the prettier status item derives its color from the "highlight.mode.normal.background" which is set in the theme.json but if the theme being used isn't an oni theme then it uses a color that oni derives, not entirely sure how tbh (@bryphe?) but the color you get I believe is a result of that. it's a tricky issue to solve for none oni themes as the highlight color I believe should fallback to something that is somehow derived from the user's colorscheme.

I think a good workaround would be to use the same derived theme colors that the language server status tab uses, at least that way it would be consistent.

@parkerault @Akin909 I was taking a look at using Oni.colors.getColor("highlight.mode.normal.background") to set the background color but this does not seem like a good choice, it's a light blue similar to the mode indicator, see:

screenshot from 2018-05-27 18-02-34

The color being used by statusbar items is hardcoded as rgb(35, 35, 35), at least for the language client ones, see here.

We have some options:

  • Remove the hardcoded setting and define a new theme color or use some other that I could not find that is reused by all statusbar items
  • Hardcode rgb(35, 35, 35) for the prettier plugin to keep consistency
  • Use "highlight.mode.normal.background"

@badosu I think the first option is the best of the three as you point out the normal mode color is a bit distracting in multiple places as I believe it tends to be a brighter color.

I think if we defined a color for status items then future status items could use it, problem with that though is that all the color schemes will need to have a color chosen for them which would make that bit of work a bit frustrating as it'd involve picking colors for 5+ colorschemes.

Another alternative which isn't up there is, doing the same thing we have for the git plugin atm which is no color i.e. just removing the background color. Precedent wise vscode (not that we should feel obliged to copy them) don't seem to color their status bar items at all and tbh in this case its the most minimal solution and I don't think many people will notice a difference

Could this be closed?

@Bergiu If this is fixed for you on master then yes.

Its fixed for me on 0.3.7-beta3.

Thanks for testing!

Was this page helpful?
0 / 5 - 0 ratings