tzachar / cmp-tabnine

TabNine plugin for hrsh7th/nvim-cmp
MIT License
287 stars 28 forks source link

Not installable under FreeBSD #27

Closed dcschmid closed 2 years ago

dcschmid commented 2 years ago

i have a problem to install this Package under FreeBSD. Under normal vim i can install coc-tabnine. But i want switch to Neovim, better features :-)

tzachar commented 2 years ago

What are the outputs to the following?

> uname -s
> uname -m
dcschmid commented 2 years ago

@tzachar Output from uname -s is FreeBSD and the Output from uname -m is amd64.

tzachar commented 2 years ago

Can you try the following patch?

diff --git a/install.sh b/install.sh
index 163866d..1021adf 100755
--- a/install.sh
+++ b/install.sh
@@ -16,7 +16,7 @@ case $(uname -s) in
         platform="$(uname -m)-apple-darwin"
     fi
     ;;
-"Linux")
+"Linux" | "FreeBSD ")
     platform="$(uname -m)-unknown-linux-musl"
     ;;
 esac
@@ -28,4 +28,13 @@ path=$version/$platform
 curl https://update.tabnine.com/bundles/${path}/TabNine.zip --create-dirs -o binaries/${path}/TabNine.zip
 unzip -o binaries/${path}/TabNine.zip -d binaries/${path}
 rm -rf binaries/${path}/TabNine.zip
+
+# when in freeBSD, brand as a linux binary
+case $(uname -s) in
+"FreeBSD ")
+ echo "trying to brand TabNine as a linux binary"
+ brandelf -t Linux binaries/$path/*
+    ;;
+esac
+
 chmod +x binaries/$path/*

TabNine does not support FreeBSD out of the box. I wonder if this will work, as I am not a FreeBSD user myslef.

tzachar commented 2 years ago

@dcschmid Did this work or not?

tzachar commented 2 years ago

Closing this for lack of user feedback