feat(lightline-vim): add lsp status
This commit is contained in:
parent
a6c2877b0d
commit
57b8cc4723
|
@ -40,15 +40,19 @@ let mapleader=" "
|
||||||
let maplocalleader=","
|
let maplocalleader=","
|
||||||
let g:camelcasemotion_key = '<leader>'
|
let g:camelcasemotion_key = '<leader>'
|
||||||
|
|
||||||
|
function! LspStatus() abort
|
||||||
|
let has_client = luaeval('not vim.tbl_isempty(vim.lsp.buf_get_clients(0))')
|
||||||
|
return has_client ? 'LSP' : ''
|
||||||
|
endfunction
|
||||||
|
|
||||||
let g:lightline = {
|
let g:lightline = {
|
||||||
\ 'colorscheme': 'powerline',
|
\ 'colorscheme': 'powerline',
|
||||||
\ 'active': {
|
\ 'active': {
|
||||||
\ 'left': [ [ 'mode', 'paste' ],
|
\ 'left': [ [ 'mode', 'paste' ],
|
||||||
\ [ 'cocstatus', 'currentfunction', 'readonly', 'filename', 'modified' ] ]
|
\ [ 'lspstatus', 'readonly', 'filename', 'modified' ] ]
|
||||||
\ },
|
\ },
|
||||||
\ 'component_function': {
|
\ 'component_function': {
|
||||||
\ 'cocstatus': 'coc#status',
|
\ 'lspstatus': 'LspStatus'
|
||||||
\ 'currentfunction': 'CocCurrentFunction'
|
|
||||||
\ },
|
\ },
|
||||||
\ }
|
\ }
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue