diff --git a/.gitmodules b/.gitmodules index 64ba8bc..9a866fe 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,9 +13,12 @@ [submodule "configs/nvim/pack/tpope/start/commentary"] path = configs/nvim/pack/tpope/start/commentary url = https://tpope.io/vim/commentary.git + ignore = dirty [submodule "configs/nvim/pack/jiangmiao/start/auto-pairs"] path = configs/nvim/pack/jiangmiao/start/auto-pairs url = https://github.com/jiangmiao/auto-pairs + ignore = dirty [submodule "configs/nvim/pack/airblade/start/vim-gitgutter"] path = configs/nvim/pack/airblade/start/vim-gitgutter url = https://github.com/airblade/vim-gitgutter.git + ignore = dirty diff --git a/configs/nvim/init.vim b/configs/nvim/init.vim index d47bc7e..47954ae 100644 --- a/configs/nvim/init.vim +++ b/configs/nvim/init.vim @@ -21,7 +21,14 @@ vnoremap +inoremap +inoremap lcw +nnoremap cwl + +" VSCode-style comment toggling +nnoremap :Commentary +vnoremap :Commentary +inoremap :Commentary " Force VIM to use system clipboard set clipboard=unnamedplus @@ -30,44 +37,17 @@ set clipboard=unnamedplus set exrc set secure -" Autoload vim-plug -let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim' -if empty(glob(data_dir . '/autoload/plug.vim')) - silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' - autocmd VimEnter * PlugInstall --sync | source $MYVIMRC -endif - -" This is where the plugins be -call plug#begin() - -" Plug 'github/copilot.vim' -Plug 'tpope/vim-fugitive' -Plug 'tpope/vim-surround' -Plug 'jiangmiao/auto-pairs' -Plug 'airblade/vim-gitgutter' -Plug 'nathanaelkane/vim-indent-guides' - -" And this is where the plugins no longer be -call plug#end() - " Enable filetype plugins set nocompatible filetype plugin on syntax on -" Enable rainbow -let g:rainbow_active = 1 - -" Allow indent guides to show -let g:indent_guides_enable_on_vim_startup = 0 -let g:indent_guides_guide_size = 1 -let g:indent_guides_auto_colors = 0 -hi IndentGuidesOdd ctermbg=darkgrey -hi IndentGuidesEven ctermbg=lightgrey - -" Make the gitgutter look cleaner -let g:gitgutter_override_sign_column_highlight = 0 +" Disable the gitgutter background +let g:gitgutter_override_sign_column_highlight = 1 highlight clear SignColumn -highlight GitGutterAdd guifg=#009900 ctermfg=2 -highlight GitGutterChange guifg=#bbbb00 ctermfg=3 -highlight GitGutterDelete guifg=#ff2222 ctermfg=1 + +" Make gitgutter update on file save +autocmd BufWritePost * GitGutter + +" Enable Leap +lua require('leap').add_default_mappings() \ No newline at end of file