neoclide/coc-java

statusline E539: Illegal character < >

jackielii opened this issue · 0 comments

Apparently the jdt.ls reports percentage in status, and we need to escape % in statusline

My lightline statusline setup:

let g:lightline.component_function = {
\  'gitbranch': 'GitBranch',
\  'current_function': 'CocCurrentFunction',
\  'current_package': 'CocCurrentPackage'
\ }

let g:lightline.active = {
\ 'left': [
\    [ 'mode', 'paste', 'readonly' ],
\    [ 'gitbranch' ],
\    [ 'current_package', 'filename', 'current_function', 'coc_status' ]
\ ],
\ 'right': [
\    [ 'lineinfo' ],
\    [ 'percent' ],
\    [ 'filetype' ],
\    [ 'coc_info', 'coc_hints', 'coc_errors', 'coc_warnings' ],
\ ]
\}

Using https://github.com/josa42/vim-lightline-coc, coc_status is provided as:

function! lightline#coc#status()
  return get(g:, 'coc_status', '')
endfunction