fix(vim): use lewis6991/gitsigns.nvim instead of airblade/vim-gitgutter for better performance

This commit is contained in:
arielherself 2025-01-06 22:43:59 +08:00
parent bd774e50ed
commit 330e7792b9
Signed by: arielherself
SSH Key Fingerprint: SHA256:AK3cyo9tFsp7Mox7K0sYphleC8hReXhnRKxwuDT5LBc
2 changed files with 13 additions and 3 deletions

14
.vimrc
View File

@ -51,7 +51,7 @@ set ttimeoutlen=0
set wildmenu
set wildoptions=fuzzy,pum
if has('nvim')
set signcolumn=yes:2
" set signcolumn=yes:2
" set cmdheight=0
set pumblend=40
set winblend=40
@ -114,12 +114,18 @@ Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug 'rhysd/conflict-marker.vim'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
" this plugin slows vim down when dealing
" with large files, so I switch to the Nvim version
" Plug 'airblade/vim-gitgutter'
if has('nvim')
Plug 'lewis6991/gitsigns.nvim'
endif
Plug 'tpope/vim-fugitive'
Plug 'Yggdroot/indentLine'
Plug '907th/vim-auto-save'
Plug 'markonm/traces.vim'
Plug 'stevearc/oil.nvim'
Plug 'vim-scripts/LargeFile'
call plug#end()
@ -328,6 +334,10 @@ let g:airline_left_alt_sep = ''
let g:airline_right_sep = ''
let g:airline_right_alt_sep = ''
if has('nvim')
lua require('gitsigns').setup()
endif
" fix c++ comment style in Neovim
" ref: https://github.com/tpope/vim-commentary/issues/15#issuecomment-23127749
autocmd FileType c,cpp,cs,java setlocal commentstring=//\ %s

View File

@ -411,7 +411,7 @@ in {
# This may not apply. Also try `git config --global gpg.ssh.program "/home/user/.nix-profile/bin/op-ssh-sign"`
# gpg."ssh".program = "${unstable._1password-gui}/bin/op-ssh-sign";
push.autoSetupRemote = true;
core.editor = "vim";
core.editor = "nvim";
};
};