haskell-vim
haskell-vim copied to clipboard
Not correct highlighting
Hi there, i just installed haskell-vim
plugin hoping for better syntax with haskell source files, however highlighting is not working as it should:
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
I've tried with old vim, and everything seems to be working nice. Perhaps a problem with neovim?
Works fine for me, I presume it's another plugin that's interfering.
The only plugins that I have are solarized and gruvbox colorschemes
I am also noticing some strange highlighting in neovim, although I am not certain that this is not the intended behaviour:
default neovim highlighting on the bottom. Brackets within strings do not seem to be interpreted correctly.
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?
Here is the gist.
NVIM v0.1.5-405-g00fc216 Build type: Release
Using dein plugin manager, init.vim (sans haskell-vim) here
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()
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.
I'm also experiencing this in vim 8.0.427 with the jellybeans theme.
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.
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.
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
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 , thanks. I moved to gruvbox fork with fixes for haskell and problem gone. https://github.com/dkasak/gruvbox