update vim config and modules

master
Andrew Coleman 2020-10-30 12:05:12 -04:00
parent b31b081391
commit 207ef573b2
12 changed files with 81 additions and 10 deletions

30
.gitmodules vendored
View File

@ -25,3 +25,33 @@
[submodule ".vim/bundle/vim-gitbranch"]
path = .vim/bundle/vim-gitbranch
url = https://github.com/itchyny/vim-gitbranch.git
[submodule "/home/andrew/.vim/bundle/ansible-vim"]
path = /home/andrew/.vim/bundle/ansible-vim
url = https://github.com/pearofducks/ansible-vim
[submodule "/home/andrew/.vim/bundle/direnv.vim"]
path = /home/andrew/.vim/bundle/direnv.vim
url = https://github.com/direnv/direnv.vim.git
[submodule "/home/andrew/.vim/bundle/lightline-ale"]
path = /home/andrew/.vim/bundle/lightline-ale
url = https://github.com/maximbaz/lightline-ale/
[submodule "/home/andrew/.vim/bundle/nerdtree-git-plugin"]
path = /home/andrew/.vim/bundle/nerdtree-git-plugin
url = https://github.com/albfan/nerdtree-git-plugin.git
[submodule "/home/andrew/.vim/bundle/vim-nix"]
path = /home/andrew/.vim/bundle/vim-nix
url = https://github.com/LnL7/vim-nix.git
[submodule "/home/andrew/.vim/bundle/vim-rails"]
path = /home/andrew/.vim/bundle/vim-rails
url = https://github.com/tpope/vim-rails.git
[submodule "/home/andrew/.vim/bundle/vim-ruby"]
path = /home/andrew/.vim/bundle/vim-ruby
url = https://github.com/vim-ruby/vim-ruby/
[submodule "/home/andrew/.vim/bundle/vim-terraform"]
path = /home/andrew/.vim/bundle/vim-terraform
url = https://github.com/hashivim/vim-terraform.git
[submodule ".vim/bundle/vim-toml"]
path = .vim/bundle/vim-toml
url = https://github.com/cespare/vim-toml.git
[submodule ".vim/bundle/vim-trailing-whitespace"]
path = .vim/bundle/vim-trailing-whitespace
url = https://github.com/bronson/vim-trailing-whitespace/

@ -0,0 +1 @@
Subproject commit 7abb04c115742ec9a5f90b86170f0118680cf8ec

@ -0,0 +1 @@
Subproject commit 983bbce66b39cd17e4b8348078a41a5782cd73a0

@ -0,0 +1 @@
Subproject commit 23352556fdaa067209fa22df424f1b88ab370f6a

@ -0,0 +1 @@
Subproject commit 95e20577cd442ad6256aff9bb2e9c80db05c13f0

1
.vim/bundle/vim-nix Submodule

@ -0,0 +1 @@
Subproject commit d733cb96707a2a6bdc6102b6d89f947688e0e959

1
.vim/bundle/vim-rails Submodule

@ -0,0 +1 @@
Subproject commit 2c42236cf38c0842dd490095ffd6b1540cad2e29

1
.vim/bundle/vim-ruby Submodule

@ -0,0 +1 @@
Subproject commit e367f7b33fe9159c943963f3f839e4d08b74090e

@ -0,0 +1 @@
Subproject commit 6fd491d6a2ae40fef3aa6c414e096ce07664f030

1
.vim/bundle/vim-toml Submodule

@ -0,0 +1 @@
Subproject commit 897cb4eaa81a0366bc859effe14116660d4015cd

@ -0,0 +1 @@
Subproject commit 610ca1a97c8dc85cdeb38635e5a4703317c4b94d

51
.vimrc
View File

@ -24,23 +24,48 @@ filetype on
filetype plugin on
filetype plugin indent on
autocmd FileType make set noexpandtab shiftwidth=8 softtabstop=0
autocmd FileType rust set shiftwidth=4 softtabstop=4 tabstop=4
let g:rustfmt_autosave = 1
autocmd FileType html set shiftwidth=4 softtabstop=4 tabstop=4
autocmd FileType javascript set shiftwidth=4 softtabstop=4 tabstop=4
autocmd FileType htmldjango set shiftwidth=4 softtabstop=4 tabstop=4
autocmd BufNewFile,BufRead *.tera set syntax=django
" Center screen when scrolling search results
nmap n nzz
nmap N Nzz
let g:lightline = {
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ]
\ },
\ 'component_function': {
\ 'gitbranch': 'gitbranch#name'
\ },
\ 'component': {
\ 'readonly': '%{&readonly?"":""}',
let g:lightline = {}
let g:lightline.component = {
\ 'readonly': '%{&readonly?"":""}',
\ }
let g:lightline.component_expand = {
\ 'linter_checking': 'lightline#ale#checking',
\ 'linter_infos': 'lightline#ale#infos',
\ 'linter_warnings': 'lightline#ale#warnings',
\ 'linter_errors': 'lightline#ale#errors',
\ 'linter_ok': 'lightline#ale#ok',
\ }
let g:lightline.component_type = {
\ 'linter_checking': 'right',
\ 'linter_infos': 'right',
\ 'linter_warnings': 'warning',
\ 'linter_errors': 'error',
\ 'linter_ok': 'right',
\ }
let g:lightline.component_function = {
\ 'gitbranch': 'gitbranch#name'
\ }
let g:lightline#ale#indicator_checking = "\uf110"
let g:lightline#ale#indicator_infos = "\uf129"
let g:lightline#ale#indicator_warnings = "\uf071"
let g:lightline#ale#indicator_errors = "\uf05e"
let g:lightline#ale#indicator_ok = "\uf00c"
let g:lightline.active = {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'gitbranch', 'readonly', 'filename', 'modified' ],
\ [ 'linter_checking', 'linter_errors', 'linter_warnings', 'linter_infos', 'linter_ok' ] ]
\}
map <C-p> :NERDTreeToggle<CR>
@ -55,6 +80,7 @@ let g:bufExplorerSortBy='name'
map <leader>o :BufExplorer<cr>
map <F2> :bprevious<CR>
map <F3> :bnext<CR>
set pastetoggle=<f5>
" highlight trailing whitespace
highlight ExtraWhitespace ctermbg=red guibg=red
@ -68,3 +94,8 @@ autocmd BufWinLeave * call clearmatches()
map <Leader>1 :diffget LOCAL<CR>
map <Leader>2 :diffget BASE<CR>
map <Leader>3 :diffget REMOTE<CR>
" packloadall
" silent! helptags ALL
let g:ale_linters = {'rust': ['analyzer']}
let g:ale_cursor_detail = 0