vimrc: update fugitive settings
This commit is contained in:
parent
f192da86a7
commit
36cdb07652
13
vimrc
13
vimrc
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue