From 515a6039cb7bc883763d9fc2a2e1bf49b7178729 Mon Sep 17 00:00:00 2001 From: Craige McWhirter Date: Fri, 19 Mar 2021 14:25:03 +1000 Subject: [PATCH] vim: Added rust filetype support --- profiles/vim.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/profiles/vim.nix b/profiles/vim.nix index 026ae9c..cfedf17 100644 --- a/profiles/vim.nix +++ b/profiles/vim.nix @@ -161,6 +161,16 @@ vim_configurable.customize { endfunction autocmd BufNewFile,BufFilePre,BufRead *.cue :call CueSettings() + " Settings for my Rust environment: + function! RustSettings() + set tabstop=4 + set shiftwidth=4 + set expandtab + set textwidth=79 + let g:rustfmt_autosave = 1 + endfunction + autocmd BufNewFile,BufFilePre,BufRead *.rs :call RustSettings() + " Settings for my Crystal environment: function! CrystalSettings() set tabstop=2 @@ -261,11 +271,11 @@ vim_configurable.customize { supertab # Allows you to use for all your insert completion syntastic # Syntax checking hacks tabular # Script for text filtering and alignment + vim-addon-nix # Scripts assisting writing .nix files vim-airline-themes # Collection of themes for airline vim-colorschemes # Collection of ViM colour schemes vim-cue # Cue filetype plugin for Vim vim-nix # Support for writing Nix expressions in vim - vim-addon-nix # Scripts assisting writing .nix files vim-polyglot # A solid language pack for Vim ]; # manually loadable by calling `:packadd $plugin-name`