Browse Source

feat(vim): don't show full file name

refactor/nvim-lua
Garrit Franke 3 years ago
parent
commit
e72e543b1e
Signed by: garrit
GPG Key ID: 65586C4DDA55EA2C
  1. 10
      .config/nvim/init.vim
  2. 1
      .gitconfig

10
.config/nvim/init.vim

@ -284,19 +284,9 @@ let g:lightline = {
\ },
\ '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
" -----------------------

1
.gitconfig

@ -0,0 +1 @@
/Users/garrit/.gitconfig
Loading…
Cancel
Save