morhetz / gruvbox

Retro groove color scheme for Vim
13.83k stars 1.11k forks source link

Haskell highlighting is broken #190

Open hadronized opened 7 years ago

hadronized commented 7 years ago

I had to remove the overridings from gruvbox to get a decent syntax highlighting back. There’s some kind of regression. Is there a way to fix that?

morhetz commented 7 years ago

elaborate please

hadronized commented 7 years ago

Yeah, sorry. I’ll try to provide a screenshot different when I meet enough spare time. The issue is that, now, for instance, the signature functions are like plain text, they don’t even have colors any more. And it’s the same for most common Haskell constructs, like operators.

Adaephon-GH commented 7 years ago

I ran into the same issue and did some digging. It seems that the cause for the broken (or only partially working) highlighting is that Gruvbox does not link to the default highlighting group names.

In the haskell syntax definition that is included with vim and nvim ($VIMRUNTIME/syntax/haskell) every group name starts with hs followed by the appropriate specifier. For example hsString, hsCharacter, hsOperator. Whereas the groups linked to by Gruvbox have the prefix haskell, for example haskellString, haskellChar, haskellOperators.

It seems to me that, when writing the highlighting for Haskell, some other plugin was active that changed the syntax definition for Haskell. One candidate might be haskell-vim as using it indeed improves highlighting with Gruvbox.

morhetz commented 7 years ago

@Adaephon-GH https://github.com/sheerun/vim-polyglot is the base syn package for modern vim so, yeah it's https://github.com/neovimhaskell/haskell-vim

hadronized commented 7 years ago

Is there any leads to fix that problem? I might switch to a fork until it gets fixed (why overriding the syntax hilighting in the first place?)

hovsater commented 6 years ago

@morhetz any update here?

mitchellwrosen commented 4 years ago

I agree syntax highlighting looks a bit bland in Haskell, but I'm not sure I understand the explanation above, nor the fix merged into gruvbox-community.

Looking at the syntax definition in gruvbox, both haskellIdentifier and haskellType are defined as GruvboxFg1. The result is a lot of white where perhaps some more color would look nicer. Here's a random example screenshot: 2020-09-08-100916_1919x1059_scrot