Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Elm files lose syntax highlighting on save #183

Open
danturn opened this issue Jun 19, 2019 · 2 comments
Open

Elm files lose syntax highlighting on save #183

danturn opened this issue Jun 19, 2019 · 2 comments

Comments

@danturn
Copy link

danturn commented Jun 19, 2019

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 danturn closed this as completed Jun 19, 2019
@danturn danturn reopened this Jun 21, 2019
@danturn
Copy link
Author

danturn commented Jun 21, 2019

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
Copy link
Author

danturn commented Jun 21, 2019

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

autocmd BufWritePost * doautocmd Syntax
autocmd BufReadPost * doautocmd Syntax

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant