vimrc: update fugitive settings

This commit is contained in:
Rob Watson 2021-03-21 21:30:20 +01:00
parent f192da86a7
commit 36cdb07652
1 changed files with 4 additions and 9 deletions

13
vimrc
View File

@ -171,13 +171,7 @@ nmap <leader>gg :Rg<cr>
" Lightline configuration:
packadd! lightline.vim
function! GitHead()
let l:head = FugitiveHead()
if l:head == ''
return ''
endif
return '[' . l:head . ']'
endfunction
set laststatus=2
function! LightlineLSPErrorText()
let l:info = lsp#get_buffer_diagnostics_counts()
@ -197,7 +191,6 @@ function! LightlineLSPWarningText()
return info.warning . sign
endfunction
set laststatus=2
let g:lightline = {
\ 'colorscheme': 'seoul256',
\ 'active': {
@ -208,7 +201,7 @@ let g:lightline = {
\ },
\ 'component_function': {
\ 'gobuild': 'go#statusline#Show',
\ 'gitbranch': 'GitHead',
\ 'gitbranch': 'FugitiveStatusline',
\ },
\ 'component_expand': {
\ 'lsperror': 'LightlineLSPErrorText',
@ -283,6 +276,8 @@ let g:lsp_diagnostics_float_cursor = 1
function! s:on_lsp_buffer_enabled() abort
setlocal omnifunc=lsp#complete
setlocal signcolumn=yes
" number may be clobbered by vim-fugitive?
setlocal number
" Jump to definitions
nmap <buffer> gd <plug>(lsp-definition)