ElmCast / elm-vim

Elm plugin for Vim
BSD 3-Clause "New" or "Revised" License
573 stars 102 forks source link

Elm files lose syntax highlighting on save #183

Open danturn opened 5 years ago

danturn commented 5 years ago

Hi,

I've been using elm-vim for some time without issues, but today when i save an elm file the colour highlighting disappears.

The formatting still works and i dont lose colour highlighting for other languages.

I've tried removing all plugins from my vim rc other than elm-vim and still get the same issue.

I notice there havent been any changes to the plugin so im more wondering if you have any advice about working out what the issue is as im not sure where to start!

Thanks

Dan

danturn commented 5 years ago

I closed this as i was having issues with highlighting in other files but it turns out its only if i have saved an elm file first, this seems to break highlighting for any file types that i dont have an explicit plugin for (i have an vim-elixir installed and the syntax still works for that after saving an elm file, but any other file types lose syntax.

I've tested this on multiple debian machines now and am seeing the same issue.

Incidentally it does not happen in neovim

I can repro it with this vimrc:

set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'elmcast/elm-vim'
call vundle#end()

filetype plugin indent on
filetype plugin on
syntax on
syntax enable
danturn commented 5 years ago

if anyone else has this im currently using this workaround in my vimrc

autocmd BufWritePost * doautocmd Syntax
autocmd BufReadPost * doautocmd Syntax