vim: Added rust filetype support

This commit is contained in:
Craige McWhirter 2021-03-19 14:25:03 +10:00
parent a7c782e03a
commit 515a6039cb
Signed by: sercanto
GPG key ID: 7DBA9F5689EFB6AA

View file

@ -161,6 +161,16 @@ vim_configurable.customize {
endfunction endfunction
autocmd BufNewFile,BufFilePre,BufRead *.cue :call CueSettings() 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: " Settings for my Crystal environment:
function! CrystalSettings() function! CrystalSettings()
set tabstop=2 set tabstop=2
@ -261,11 +271,11 @@ vim_configurable.customize {
supertab # Allows you to use <Tab> for all your insert completion supertab # Allows you to use <Tab> for all your insert completion
syntastic # Syntax checking hacks syntastic # Syntax checking hacks
tabular # Script for text filtering and alignment tabular # Script for text filtering and alignment
vim-addon-nix # Scripts assisting writing .nix files
vim-airline-themes # Collection of themes for airline vim-airline-themes # Collection of themes for airline
vim-colorschemes # Collection of ViM colour schemes vim-colorschemes # Collection of ViM colour schemes
vim-cue # Cue filetype plugin for Vim vim-cue # Cue filetype plugin for Vim
vim-nix # Support for writing Nix expressions in 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 vim-polyglot # A solid language pack for Vim
]; ];
# manually loadable by calling `:packadd $plugin-name` # manually loadable by calling `:packadd $plugin-name`