Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Rework Vim install instructions #610

Open
andys8 opened this issue Jun 30, 2019 · 2 comments
Open

Rework Vim install instructions #610

andys8 opened this issue Jun 30, 2019 · 2 comments

Comments

@andys8
Copy link
Contributor

andys8 commented Jun 30, 2019

The current recommendation is to use elmcast/elm-vim. As of today, I'd not recommend using this plugin, because Elm 0.19 is still not supported for some things: ElmCast/elm-vim#182 and other issues https://github.com/ElmCast/elm-vim/issues

Alternatives

Ale

I'd recommend either using w0rp/ale, which has an elm-format fixer.

https://github.com/w0rp/ale/blob/8768a309b8ef1c2e819dcb6f4630f73acab59792/doc/ale-elm.txt#L6
https://github.com/w0rp/ale/blob/master/supported-tools.md

elm-language-server

Or use elm-format through elm-language-server. It'll solve more things, but formatting is a part of it.

https://github.com/elm-tooling/elm-language-server
https://github.com/elm-tooling/elm-language-server/blob/f84c65d3ff4ab0e3887900a10d55970321f8b07c/src/providers/documentFormatingProvider.ts

@rofrol
Copy link

rofrol commented Sep 1, 2019

This might be helpful:

autocmd Filetype elm setlocal ts=4 sw=4 sts=4 expandtab nowrap

And for Neoformat:

augroup fmt
  autocmd!
  autocmd BufWritePre *.elm undojoin | Neoformat
augroup END

(thanks to @Janiczek)

@jc00ke
Copy link

jc00ke commented Jan 30, 2020

@rofrol thanks for sharing! I couldn't get coc.nvim to format in my project, and using Neoformat with your (and @Janiczek's) suggestion worked very well.

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

No branches or pull requests

3 participants