tsuquyomi icon indicating copy to clipboard operation
tsuquyomi copied to clipboard

"Your TypeScript version is invalid" in MacVim 8.0

Open astashov opened this issue 7 years ago • 2 comments

I believe it happens because here the callback happens after Vim changes the status of the job from run to dead, thus out is always returned as an empty string.

In regular Vim 8.0 (the one I run in Terminal) it seems to be working fine though. I tried with the latest stable MacVim 8.0, and the latest edge (8.0.567).

astashov avatar Apr 27 '17 18:04 astashov

I just tried to debug it. I think the error occurs in autoload/tsuquyomi/config.vim line 141 where in case of VIM8 s:system is used to figure out the installed version of typescript.

if !s:is_vim8
    let out = s:Process.system(l:cmd.' --version')
  else
    let out = s:system(l:cmd.' --version')
  endif

Changing this fixes it for me:

if !s:is_vim8
    let out = s:Process.system(l:cmd.' --version')
  else
    " don't use s:system but system (fixes macvim 8.0 'Your TypeScript version is invalid')
    let out = system(l:cmd.' --version')
  endif

Since I cannot really create a pull request ATM I'll leave it at that.

Thank you @Quramy for this magnificent integration of typescript into VIM! Much appreciated!

thenoseman avatar May 09 '17 10:05 thenoseman

@thenoseman thanks, I'll fix it.

Quramy avatar May 09 '17 10:05 Quramy