gruvbox icon indicating copy to clipboard operation
gruvbox copied to clipboard

Haskell highlighting is broken

Open hadronized opened this issue 8 years ago • 7 comments

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?

hadronized avatar Aug 17 '17 14:08 hadronized

elaborate please

morhetz avatar Aug 17 '17 17:08 morhetz

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.

hadronized avatar Aug 18 '17 18:08 hadronized

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.

Adaephon-GH avatar Oct 02 '17 10:10 Adaephon-GH

@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

morhetz avatar Oct 02 '17 10:10 morhetz

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?)

hadronized avatar Nov 11 '17 15:11 hadronized

@morhetz any update here?

hovsater avatar Apr 16 '18 20:04 hovsater

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

mitchellwrosen avatar Sep 08 '20 14:09 mitchellwrosen