kitagry / asyncomplete-tabnine.vim

Experimental plugin for asyncomplete.vim and tabnine
13 stars 4 forks source link

install.sh doesn't work with Apple ARM chip #11

Closed svenrdz closed 3 years ago

svenrdz commented 3 years ago

I think the urls to get the version number and binaries in install.sh are outdated, and at the same time there was a recent update to add support for Apple's M1 chip.

There's an updated version of the download script in the official vim repo: https://github.com/codota/tabnine-vim/blob/master/dl_binaries.sh

For it to work, I've also added in s:parse_architecture these lines, to account for the fact that system seems to give arm64 instead of aarch64, as used in the tabnine binaries:

    if l:system =~ 'arm64'
        return 'aarch64'
    endif
kitagry commented 3 years ago

Thank you for the report! I'll fix it this weekend.

kitagry commented 3 years ago

@svenrdz I think it was resolved in #12. But, I don't have M1 Mac. Would you try #12?

svenrdz commented 3 years ago

@kitagry There's a typo in s:parse_macos_architecture(), after fixing it locally it installs the binaries as expected 👍

@@ -178,7 +180,7 @@ function! s:parse_macos_architecture() abort
     let l:system = system('uname -m')
     if  l:system =~ 'x86-64' || l:system =~ 'x86_64'
         return 'x86_64'
-    elseif l:system =! 'arm64'  " m1 mac
+    elseif l:system =~ 'arm64'  " m1 mac
         return 'aarch64'
     endif
 endfunction
kitagry commented 3 years ago

Oh, it is easy mistake. Thank you.

kitagry commented 3 years ago

Thanks for your cooperation!