haskell-vim icon indicating copy to clipboard operation
haskell-vim copied to clipboard

Not correct highlighting

Open ghost opened this issue 8 years ago • 14 comments

Hi there, i just installed haskell-vim plugin hoping for better syntax with haskell source files, however highlighting is not working as it should:

gruvbox solarized

I've already uninstalled and re-installed the plugin but it does not seem to work. I also tried removing the colorscheme, and using Neovim's defaut, however without sucess I'm using neovim 0.1.3 in a Arch Linux machine

ghost avatar Apr 17 '16 18:04 ghost

I've tried with old vim, and everything seems to be working nice. Perhaps a problem with neovim?

ghost avatar Apr 17 '16 18:04 ghost

Works fine for me, I presume it's another plugin that's interfering.

raichoo avatar Apr 18 '16 07:04 raichoo

The only plugins that I have are solarized and gruvbox colorschemes

ghost avatar Apr 19 '16 08:04 ghost

I am also noticing some strange highlighting in neovim, although I am not certain that this is not the intended behaviour: screen shot 2016-08-04 at 4 43 46 pm default neovim highlighting on the bottom. Brackets within strings do not seem to be interpreted correctly.

CallumHoward avatar Aug 04 '16 06:08 CallumHoward

I've tried this and I cannot reproduce this. Can you give me a gist of the file you are working with so I can check this will all the context attached to it?

raichoo avatar Aug 04 '16 11:08 raichoo

Here is the gist.

NVIM v0.1.5-405-g00fc216 Build type: Release

Using dein plugin manager, init.vim (sans haskell-vim) here

CallumHoward avatar Aug 04 '16 14:08 CallumHoward

Same problem here. Both on vim and nvim. The versions are Vim 7.4.1689 and NVIM 0.1.5-dev build type: RelWithDebInfo on Ubuntu 16.04. The vimrc is

filetype on syntax on filetype plugin indent on call plug#begin('~/.vim/plugged')

Plug 'neovimhaskell/haskell-vim'

call plug#end()

dfioravanti avatar Aug 21 '16 17:08 dfioravanti

I'm seeing the same problem, with nvim 0.1.7, dein plugin manager, and colorsbox-material theme (which is closely related to gruvbox, which @afonsojoao96 mentioned using). I've noticed that having termguicolors set or not seems to affect the highlighting behavior, but only for this plugin (other languages highlight correctly). Further, by looking at the output of :scriptnames, it appears that the default nvim haskell.vim ftplugin executes after this plugin, which could be causing the odd highlighting.

If it would help, I can provide a stripped down init.vim, the output of :scriptnames, etc., but I have omitted this for the time being as I suspect that my minimal config to demonstrate this problem will be very similar to those already posted.

wbthomason avatar Jan 05 '17 20:01 wbthomason

I'm also experiencing this in vim 8.0.427 with the jellybeans theme.

Hrothen avatar Apr 16 '17 19:04 Hrothen

No matter how often I try this… I cannot reproduce it at all. Not with one of the minimal config files, not with mine. No clue what's going on here.

raichoo avatar Apr 16 '17 19:04 raichoo

I appear to have fixed this for myself by removing the { 'for': 'haskell' } annotation from my vim-plug import of haskell-vim, which is weird since other people with the issue don't have that bit already. I see the same thing as @wbthomason with the haskell-vim syntax file being sourced and then the default syntax. My quick reading of the manual suggests that the default syntax file is supposed to either not be sourced at all, or sourced first.

Hrothen avatar Apr 28 '17 12:04 Hrothen

I have two macs both running the same dotfiles (although I didn't doublecheck that every vim plugin is at the same version) and one was experiencing this and the other wasn't. My colorscheme is gruvbox which sets its own colors for haskell. I didn't carefully check that it was overriding all of haskell-vim's highlight settings, I just deleted that whole block and now I have highlighting back from haskell-vim.

It's a deliberate choice from the grubox author to keep haskell highlighting to fewer colours than other languages https://github.com/morhetz/gruvbox/pull/134#issuecomment-250143084

colorsbox-material is based off of gruvbox and so sees the same issue; no idea why jellybeans is affected though

rob-b avatar May 05 '17 17:05 rob-b

After getting to my home laptop I found out that I'd obviously at some point in the past edited gruvbox on that machine too and forgotten about it. So, for me at least, this is a gruvbox issue

rob-b avatar May 05 '17 19:05 rob-b

@rob-b , thanks. I moved to gruvbox fork with fixes for haskell and problem gone. https://github.com/dkasak/gruvbox

ykrivopalov avatar May 26 '17 10:05 ykrivopalov