mirror of
https://codeberg.org/frosty/dotfiles-server.git
synced 2024-09-19 03:26:44 -04:00
switch to lightline, show git diff info, and add more options
This commit is contained in:
parent
c14d34a55e
commit
e5deeb4289
38
.vim/vimrc
38
.vim/vimrc
|
@ -1,19 +1,23 @@
|
||||||
" =====================================
|
" =====================================
|
||||||
" -- Plugin management --
|
" -- Plugin management --
|
||||||
" =====================================
|
" =====================================
|
||||||
|
|
||||||
call plug#begin()
|
call plug#begin()
|
||||||
|
|
||||||
" Status line
|
|
||||||
Plug 'vim-airline/vim-airline'
|
|
||||||
Plug 'vim-airline/vim-airline-themes'
|
|
||||||
" Theme
|
" Theme
|
||||||
Plug 'morhetz/gruvbox'
|
Plug 'morhetz/gruvbox'
|
||||||
|
" Status line
|
||||||
|
Plug 'itchyny/lightline.vim'
|
||||||
" File manager
|
" File manager
|
||||||
Plug 'lambdalisue/vim-fern'
|
Plug 'lambdalisue/vim-fern'
|
||||||
" Comment remap
|
" Comment remap
|
||||||
Plug 'tpope/vim-commentary'
|
Plug 'tpope/vim-commentary'
|
||||||
" Git diff viewer
|
" Git diff viewer
|
||||||
Plug 'airblade/vim-gitgutter'
|
Plug 'airblade/vim-gitgutter'
|
||||||
|
" Git integration
|
||||||
|
Plug 'tpope/vim-fugitive'
|
||||||
|
" Git diff Lightline integration
|
||||||
|
Plug 'niklaas/lightline-gitdiff'
|
||||||
|
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
|
@ -22,11 +26,16 @@ call plug#end()
|
||||||
" -- Behavior --
|
" -- Behavior --
|
||||||
" =====================================
|
" =====================================
|
||||||
|
|
||||||
|
" Disable mode in command line
|
||||||
|
set noshowmode
|
||||||
|
set laststatus=2
|
||||||
" Line numbers
|
" Line numbers
|
||||||
set number
|
set number
|
||||||
set relativenumber
|
set relativenumber
|
||||||
" Cursor line highlight
|
" Cursor line highlight
|
||||||
set cursorline
|
set cursorline
|
||||||
|
" Mouse support
|
||||||
|
set mouse=a
|
||||||
" Terminal title
|
" Terminal title
|
||||||
set title
|
set title
|
||||||
" Auto reload changes
|
" Auto reload changes
|
||||||
|
@ -41,6 +50,7 @@ set nobackup
|
||||||
set noswapfile
|
set noswapfile
|
||||||
set viminfofile=~/.vim/viminfo
|
set viminfofile=~/.vim/viminfo
|
||||||
" Performance
|
" Performance
|
||||||
|
set ttyfast
|
||||||
set lazyredraw
|
set lazyredraw
|
||||||
" Split behavior
|
" Split behavior
|
||||||
set splitbelow
|
set splitbelow
|
||||||
|
@ -57,8 +67,26 @@ set novisualbell
|
||||||
set background=dark
|
set background=dark
|
||||||
colorscheme gruvbox
|
colorscheme gruvbox
|
||||||
hi Normal guibg=NONE ctermbg=NONE
|
hi Normal guibg=NONE ctermbg=NONE
|
||||||
" Airline theme
|
" Lightline theme
|
||||||
let g:airline_theme='gruvbox'
|
let g:lightline = {
|
||||||
|
\ 'colorscheme': 'gruvbox',
|
||||||
|
\ 'active': {
|
||||||
|
\ 'left': [['mode', 'paste'], ['gitbranch', 'readonly', 'filename', 'modified'], ['gitdiff']],
|
||||||
|
\ 'right': [['lineinfo'], ['percent'], ['filetype']]
|
||||||
|
\ },
|
||||||
|
\ 'component_function': {
|
||||||
|
\ 'gitbranch': 'fugitive#head',
|
||||||
|
\ },
|
||||||
|
\ 'component_expand': {
|
||||||
|
\ 'gitdiff': 'lightline#gitdiff#get',
|
||||||
|
\ },
|
||||||
|
\ 'component_type': {
|
||||||
|
\ 'gitdiff': 'middle',
|
||||||
|
\ },
|
||||||
|
\ }
|
||||||
|
let g:lightline#gitdiff#indicator_added = '+ '
|
||||||
|
let g:lightline#gitdiff#indicator_deleted = '- '
|
||||||
|
let g:lightline#gitdiff#indicator_modified = '~ '
|
||||||
|
|
||||||
|
|
||||||
" =====================================
|
" =====================================
|
||||||
|
|
Loading…
Reference in a new issue