From f58dde7a81eeecb0dfb31ca0ae767f1e460881e7 Mon Sep 17 00:00:00 2001 From: Thomas Gideon Date: Fri, 19 Jan 2018 16:40:04 -0500 Subject: [PATCH] Improve auto formatting --- autoformat.vim | 1 - ftplugin/rust.vim | 3 +-- ftplugin/scala.vim | 1 + lsp.vim | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) create mode 100644 ftplugin/scala.vim diff --git a/autoformat.vim b/autoformat.vim index dfc089a..1909bb6 100644 --- a/autoformat.vim +++ b/autoformat.vim @@ -1,4 +1,3 @@ -au BufWrite * :Autoformat " see here for instructions to get scalafmt set up let g:formatdef_scalafmt = '"ng-nailgun scalafmt"' let g:formatters_scala = ['scalafmt'] diff --git a/ftplugin/rust.vim b/ftplugin/rust.vim index 13e7a13..4ef03d1 100644 --- a/ftplugin/rust.vim +++ b/ftplugin/rust.vim @@ -1,2 +1 @@ -let g:formatdef_rustfmt_force = '"rustfmt --force"' -let g:formatters_rust = ['rustfmt_force'] +let g:rustfmt_autosave = 1 diff --git a/ftplugin/scala.vim b/ftplugin/scala.vim new file mode 100644 index 0000000..b7bbae5 --- /dev/null +++ b/ftplugin/scala.vim @@ -0,0 +1 @@ +au BufWrite * :Autoformat diff --git a/lsp.vim b/lsp.vim index 47ad729..46e728a 100644 --- a/lsp.vim +++ b/lsp.vim @@ -1,7 +1,7 @@ set hidden let g:LanguageClient_serverCommands = { - \ 'rust': ['rustup', 'run', 'nightly', 'rls'], + \ 'rust': ['rls'], \ } nnoremap K :call LanguageClient_textDocument_hover()