Relative path in lightline, changed it's color.
This commit is contained in:
parent
6249dd99ae
commit
478adab24c
@ -5,6 +5,7 @@ Plug 'junegunn/fzf'
|
||||
Plug 'junegunn/fzf.vim'
|
||||
Plug 'tpope/vim-commentary'
|
||||
Plug 'itchyny/lightline.vim'
|
||||
Plug 'itchyny/vim-gitbranch'
|
||||
Plug 'airblade/vim-gitgutter'
|
||||
Plug 'hashivim/vim-terraform'
|
||||
Plug 'bitc/vim-bad-whitespace'
|
||||
@ -76,22 +77,33 @@ let g:gitgutter_sign_modified = '~'
|
||||
let g:Hexokinase_highlighters = [ 'backgroundfull' ]
|
||||
|
||||
let g:lightline = {
|
||||
\ 'colorscheme': 'ayu',
|
||||
\ 'active': {
|
||||
\ 'left': [ [ 'mode', 'paste' ],
|
||||
\ [ 'readonly', 'filename' ] ],
|
||||
\ [ 'readonly', 'gitbranch', 'filename' ] ],
|
||||
\ 'right': [ [ 'lineinfo' ],
|
||||
\ [ 'percent' ],
|
||||
\ [ 'filetype' ] ]
|
||||
\ },
|
||||
\ 'component_function': {
|
||||
\ 'readonly': 'LightLineReadonly'},
|
||||
\ 'readonly': 'LightLineReadonly',
|
||||
\ 'filename': 'LightLineFilename',
|
||||
\ 'gitbranch': 'gitbranch#name'
|
||||
\ }
|
||||
\ }
|
||||
|
||||
function! LightLineReadonly()
|
||||
return &readonly && &filetype !=# 'help' ? '' : ''
|
||||
endfunction
|
||||
|
||||
function! LightLineFilename()
|
||||
let root = fnamemodify(get(b:, 'gitbranch_path'), ':h:h')
|
||||
let path = expand('%:p')
|
||||
if path[:len(root)-1] ==# root
|
||||
return path[len(root)+1:]
|
||||
endif
|
||||
return expand('%')
|
||||
endfunction
|
||||
|
||||
if filereadable(glob('~/.local/config/init.vim'))
|
||||
source ~/.local/config/init.vim
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user