From 72ac8639a28a18416f0d7f5b6b5b037b59e94717 Mon Sep 17 00:00:00 2001 From: Jordan Orelli Date: Mon, 12 Jun 2023 10:01:59 -0500 Subject: [PATCH] move rustfmt on save into rust.vim the way I had it set up before, it wasn't being run on neovim. Rustfmt on save is not a part of ALE, it's just a part of the rust.vim plugin. --- vim/ftplugin/rust.vim | 2 ++ vimrc | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/vim/ftplugin/rust.vim b/vim/ftplugin/rust.vim index 2abbfdd..5c2c266 100644 --- a/vim/ftplugin/rust.vim +++ b/vim/ftplugin/rust.vim @@ -1,3 +1,5 @@ +let g:rustfmt_autosave = 1 + nmap :Cargo run nmap :Cargo check nmap :Cargo test diff --git a/vimrc b/vimrc index ed25855..136bd2a 100644 --- a/vimrc +++ b/vimrc @@ -45,6 +45,7 @@ call vundle#begin() Plugin 'Glench/Vim-Jinja2-Syntax' " jinja2 syntax stuff Plugin 'rust-lang/rust.vim' " bare minimum rust syntax stuff Plugin 'elubow/cql-vim' + Plugin 'tikhomirov/vim-glsl' " Past plugins " @@ -481,7 +482,6 @@ let g:SuperTabClosePreviewOnPopupClose = 1 if !has('nvim') let g:ale_linters = {'rust': ['analyzer']} let g:ale_fixers = {'rust': ['rustfmt', 'trim_whitespace', 'remove_trailing_lines']} - let g:rustfmt_autosave = 1 let g:ale_rust_cargo_use_clippy = 1 let g:ale_completion_enabled = 1 set completeopt=menu,menuone,preview,noselect,noinsert