Use an autoformat plugin for everything.

This commit is contained in:
Thomas Gideon 2018-01-16 14:21:05 -05:00
parent b4163b14de
commit 420dee4934
4 changed files with 10 additions and 1 deletions

4
autoformat.vim Normal file
View file

@ -0,0 +1,4 @@
au BufWrite * :Autoformat
" see here for instructions to get scalafmt set up
let g:formatdef_scalafmt = '"ng-nailgun scalafmt"'
let g:formatters_scala = ['scalafmt']

View file

@ -1 +1,2 @@
let g:autofmt_autosave = 1 let g:formatdef_rustfmt_force = '"rustfmt --force"'
let g:formatters_rust = ['rustfmt_force']

View file

@ -45,6 +45,9 @@ Plug 'vim-scripts/groovy.vim'
Plug 'vim-scripts/groovyindent-unix' Plug 'vim-scripts/groovyindent-unix'
" LSP " LSP
Plug 'autozimu/LanguageClient-neovim', {'tag': 'binary-*-x86_64-unknown-linux-musl'} Plug 'autozimu/LanguageClient-neovim', {'tag': 'binary-*-x86_64-unknown-linux-musl'}
" auto format all the things
" https://github.com/Chiel92/vim-autoformat
Plug 'Chiel92/vim-autoformat'
" All of your Plugins must be added before the following line " All of your Plugins must be added before the following line
call plug#end() " required call plug#end() " required

1
vimrc
View file

@ -16,6 +16,7 @@ source mapping.vim
source jsonnet.vim source jsonnet.vim
source racer.vim source racer.vim
source lsp.vim source lsp.vim
source autoformat.vim
exec "cd " . oldwd exec "cd " . oldwd
" turn on file type plugins " turn on file type plugins