neovimhaskell / haskell-vim

Custom Haskell Vimscripts
BSD 2-Clause "Simplified" License
682 stars 84 forks source link

Not correct highlighting #66

Open ghost opened 8 years ago

ghost commented 8 years ago

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 commented 8 years ago

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

raichoo commented 8 years ago

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

ghost commented 8 years ago

The only plugins that I have are solarized and gruvbox colorschemes

CallumHoward commented 8 years ago

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.

raichoo commented 8 years ago

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?

CallumHoward commented 8 years ago

Here is the gist.

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

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

dfioravanti commented 8 years ago

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

wbthomason commented 7 years ago

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.

Hrothen commented 7 years ago

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

raichoo commented 7 years ago

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.

Hrothen commented 7 years ago

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.

rob-b commented 7 years ago

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 commented 7 years ago

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

ykrivopalov commented 7 years ago

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