diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index ee6cdc8..693c19c 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -264,6 +264,28 @@ nnoremap :NERDTreeMirror:NERDTreeFind " Rainbow Brackets let g:rainbow_active = 1 +" Lightline +let g:lightline = { + \ 'colorscheme': 'wombat', + \ 'active': { + \ 'left': [ [ 'mode', 'paste' ], + \ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ], + \ }, + \ 'component_function': { + \ 'gitbranch': 'FugitiveHead', + \ 'filename': 'LightlineFilename', + \ }, + \ } + +function! LightlineFilename() + let root = fnamemodify(get(b:, 'git_dir'), ':h') + let path = expand('%:p') + if path[:len(root)-1] ==# root + return path[len(root)+1:] + endif + return expand('%') +endfunction + " ----------------------- " Remaps " -----------------------