dotfiles/vim/.vim/after/ftplugin/rust.vim

19 lines
637 B
VimL
Raw Normal View History

2023-11-12 19:53:07 +01:00
syntax enable
filetype plugin indent on
set omnifunc=ale#completion#OmniFunc
" set omnifunc+=syntaxcomplete#Complete
" set omnifunc=ale#completion#Complete
let g:ale_completion_enabled = 1
let g:ale_completion_autoimport = 1
let g:ale_sign_column_always = 1
let g:ale_fix_on_save = 1
2023-11-12 20:06:51 +01:00
" let g:ale_fixers = { 'rust': ['rustfmt', 'trim_whitespace', 'remove_trailing_lines'] }
2023-11-12 19:53:07 +01:00
" The following lines are needed to provide compatibility between
" rust-analyzer and ALE. When this is not included ALE omnifunc completion
" locks up completely at autocomplete
2023-11-12 20:06:51 +01:00
2023-11-12 19:53:07 +01:00
let g:ale_rust_rls_executable = 'rust-analyzer'
let g:ale_rust_rls_toolchain = ''