fannheyward / coc-texlab

TexLab extension for coc.nvim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

coc-textlab notification still showing on vim-lightline

mnabila opened this issue · comments

why coc-texlab still showing notification about compiling tex file if result from compilations was appeared
Screenshot_20200318_065736

--sorry if my english to bad

This notification is not shown by coc-texlab, please checkout your other plugins, or provide a minimal vimrc to reproduce this issue.

minimal vimrc

coc.nvim

"" coc.nvim {{{
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
if exists('g:plugs["coc.nvim"]')
  let g:coc_node_path = "/usr/bin/node"
  let g:coc_filetype_map = {
        \ 'html.swig': 'html',
        \ 'jinja2.html': 'html',
        \ 'wxss': 'css',
        \ 'sass': 'css',
        \ }
  let g:coc_global_extensions=[
        \ 'coc-css',
        \ 'coc-emmet',
        \ 'coc-go',
        \ 'coc-highlight',
        \ 'coc-html',
        \ 'coc-json',
        \ 'coc-marketplace',
        \ 'coc-phpls',
        \ 'coc-prettier',
        \ 'coc-python',
        \ 'coc-sh',
        \ 'coc-snippets',
        \ 'coc-tsserver',
        \ 'coc-vetur',
        \ 'coc-vimlsp',
        \ 'coc-word',
        \ 'coc-xml',
        \ 'coc-texlab',
        \ 'coc-yaml'
        \ ]
  autocmd! CompleteDone * if pumvisible() == 0 | pclose | endif
  autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
  autocmd User CocLocationsChange CocList --normal -A location
  autocmd CursorHold * silent call CocActionAsync('highlight')
endif
" }}}
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

coc-settings.json

  "latex.build.args": [ "-xelatex", "-file-line-error", "-synctex=1", "-interaction=nonstopmode" ],
  "latex.build.executable": "latexmk",


lightline.vim

"" lightline.vim {{{
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
if exists('g:plugs["lightline.vim"]')
  let g:lightline = {
        \   'colorscheme': 'gruvbox',
        \   'active': {
        \     'left':[ [ 'mode', 'paste' ],
        \              [ 'gitstatus' ],
        \              [ 'readonly', 'fname', 'modified' ], ],
        \     'right': [ [ 'lineinfo' ],
        \              [ 'filetype' ],
        \              [ 'currentfunction', 'cocstatus', 'fileformat', 'fileencoding' ], ],
        \   },
        \   'inactive': {
        \    'left': [ [ 'fname' ], ],
        \   'right': [ [ 'lineinfo' ], ],
        \   },
        \   'tabline': {
        \     'left': [ [ 'buffers' ], ],
        \     'right': [ [ 'username' ], ],
        \   },
        \   'component': {
        \     'lineinfo': '%3p%%  %l/%-L',
        \     'username': $USER,
        \     'fname': '%<%f',
        \   },
        \   'component_expand': {
        \     'buffers': 'lightline#bufferline#buffers',
        \   },
        \   'component_type': {
        \     'buffers': 'tabsel',
        \   },
        \   'component_function': {
        \     'bufferinfo': 'lightline#buffer#bufferinfo',
        \     'cocstatus': 'coc#status',
        \     'currentfunction': 'CocCurrentFunction',
        \     'gitstatus': 'GitStatus',
        \     'modified': 'LightlineModified',
        \     'readonly': 'LightlineReadonly',
        \     'filetype': 'MyFiletype',
        \     'fileformat': 'MyFileformat',
        \   },
        \   'separator':{
        \     'left': '', 'right': ''
        \   },
        \   'subseparator':{
        \     'left': '', 'right': ''
        \   },
        \}

  let g:lightline#bufferline#enable_devicons   = 1
  let g:lightline#bufferline#filename_modifier = ':t'
  let g:lightline#bufferline#shorten_path      = 0
  let g:lightline#bufferline#show_number       = 0
  let g:lightline#bufferline#unicode_symbols   = 1
  let g:lightline#bufferline#unnamed           = 'NO NAME'

  function! LightlineModified()
    return &modified ? '●' : ''
  endfunction

  function! LightlineReadonly()
    return &readonly ? '' : ''
  endfunction

  function! CocCurrentFunction()
    return get(b:, 'coc_current_function', '')
  endfunction

  function! MyFiletype()
    return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype . ' ' . WebDevIconsGetFileTypeSymbol() : 'no ft') : ''
  endfunction

  function! MyFileformat()
    return winwidth(0) > 70 ? (&fileformat . ' ' . WebDevIconsGetFileFormatSymbol()) : ''
  endfunction

  function! GitStatus()
    let [a,m,r] = GitGutterGetHunkSummary()
    let l:branch = fugitive#head()
    if l:branch == ""
      return ''
    else
      return printf('+%d ~%d -%d |  %s', a, m, r, l:branch)
    endif
  endfunction
endif
" }}}
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

This issue is not caused by this project, and is caused by texlab binary. Because coc.nvim follows only latest released LSP, $/progress API is incompatible with previously proposed (preleased) LSP.

$/progress has three kinds of value: begin, report, and end
but texlab returns three kinds of value: begin, report, and done

So we should wait for releasing new texlab.

We can close this issue by latest release (2.0.0) of texlab .
latex-lsp/texlab#200

I checked that status-line integration works well.

@fannheyward As I'm not author of this issue, I could not close it.