neoclide / coc-tsserver

Tsserver extension for coc.nvim that provide rich features like VSCode for javascript & typescript
MIT License
1.05k stars 68 forks source link

apply initializing text in VersionStatus constructor #389

Closed VladimirPal closed 3 months ago

VladimirPal commented 1 year ago

Hi! Initializing tsserver text is not showing after vim launching.

❯ vim --version
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Aug 06 2022 10:35:28)
macOS version - x86_64

I'm using lightline to display a status of tsserver:

let g:lightline = {
  \ 'active': {
  \   'left': [ [ 'mode', 'paste' ],
  \             [ 'cocstatus', 'readonly', 'filename', 'modified' ] ]
  \ },
  \ 'component_function': {
  \   'cocstatus': 'coc#status'
  \ },
  \ }

I've test it and loading setter changing immediately from true on false.

  public set loading(isLoading: boolean) {
    if (isLoading) {
      this._versionBarEntry.text = `Initializing tsserver ${this._versionString}`
    } else {
      this._versionBarEntry.text = `TSC ${this._versionString}`
    }
    this._versionBarEntry.isProgress = isLoading
  }

The only way to see a loading indicator is manual :CocRestart