diff --git a/.gitmodules b/.gitmodules index dbd1da6..3325200 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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/ diff --git a/.vim/bundle/ansible-vim b/.vim/bundle/ansible-vim new file mode 160000 index 0000000..7abb04c --- /dev/null +++ b/.vim/bundle/ansible-vim @@ -0,0 +1 @@ +Subproject commit 7abb04c115742ec9a5f90b86170f0118680cf8ec diff --git a/.vim/bundle/direnv.vim b/.vim/bundle/direnv.vim new file mode 160000 index 0000000..983bbce --- /dev/null +++ b/.vim/bundle/direnv.vim @@ -0,0 +1 @@ +Subproject commit 983bbce66b39cd17e4b8348078a41a5782cd73a0 diff --git a/.vim/bundle/lightline-ale b/.vim/bundle/lightline-ale new file mode 160000 index 0000000..2335255 --- /dev/null +++ b/.vim/bundle/lightline-ale @@ -0,0 +1 @@ +Subproject commit 23352556fdaa067209fa22df424f1b88ab370f6a diff --git a/.vim/bundle/nerdtree-git-plugin b/.vim/bundle/nerdtree-git-plugin new file mode 160000 index 0000000..95e2057 --- /dev/null +++ b/.vim/bundle/nerdtree-git-plugin @@ -0,0 +1 @@ +Subproject commit 95e20577cd442ad6256aff9bb2e9c80db05c13f0 diff --git a/.vim/bundle/vim-nix b/.vim/bundle/vim-nix new file mode 160000 index 0000000..d733cb9 --- /dev/null +++ b/.vim/bundle/vim-nix @@ -0,0 +1 @@ +Subproject commit d733cb96707a2a6bdc6102b6d89f947688e0e959 diff --git a/.vim/bundle/vim-rails b/.vim/bundle/vim-rails new file mode 160000 index 0000000..2c42236 --- /dev/null +++ b/.vim/bundle/vim-rails @@ -0,0 +1 @@ +Subproject commit 2c42236cf38c0842dd490095ffd6b1540cad2e29 diff --git a/.vim/bundle/vim-ruby b/.vim/bundle/vim-ruby new file mode 160000 index 0000000..e367f7b --- /dev/null +++ b/.vim/bundle/vim-ruby @@ -0,0 +1 @@ +Subproject commit e367f7b33fe9159c943963f3f839e4d08b74090e diff --git a/.vim/bundle/vim-terraform b/.vim/bundle/vim-terraform new file mode 160000 index 0000000..6fd491d --- /dev/null +++ b/.vim/bundle/vim-terraform @@ -0,0 +1 @@ +Subproject commit 6fd491d6a2ae40fef3aa6c414e096ce07664f030 diff --git a/.vim/bundle/vim-toml b/.vim/bundle/vim-toml new file mode 160000 index 0000000..897cb4e --- /dev/null +++ b/.vim/bundle/vim-toml @@ -0,0 +1 @@ +Subproject commit 897cb4eaa81a0366bc859effe14116660d4015cd diff --git a/.vim/bundle/vim-trailing-whitespace b/.vim/bundle/vim-trailing-whitespace new file mode 160000 index 0000000..610ca1a --- /dev/null +++ b/.vim/bundle/vim-trailing-whitespace @@ -0,0 +1 @@ +Subproject commit 610ca1a97c8dc85cdeb38635e5a4703317c4b94d diff --git a/.vimrc b/.vimrc index 1dc222f..2d0b2e1 100644 --- a/.vimrc +++ b/.vimrc @@ -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 :NERDTreeToggle @@ -55,6 +80,7 @@ let g:bufExplorerSortBy='name' map o :BufExplorer map :bprevious map :bnext +set pastetoggle= " highlight trailing whitespace highlight ExtraWhitespace ctermbg=red guibg=red @@ -68,3 +94,8 @@ autocmd BufWinLeave * call clearmatches() map 1 :diffget LOCAL map 2 :diffget BASE map 3 :diffget REMOTE + +" packloadall +" silent! helptags ALL +let g:ale_linters = {'rust': ['analyzer']} +let g:ale_cursor_detail = 0