Coder Social home page Coder Social logo

Comments (7)

tzachar avatar tzachar commented on June 14, 2024 1

There is a strange control character in the binary's path.
Try removing the binaries folder and reinstall:

> rm /home/krion/.local/share/nvim/plugged/cmp-tabnine/binaries
> /home/krion/.local/share/nvim/plugged/cmp-tabnine/install.sh

from cmp-tabnine.

krionbsd avatar krionbsd commented on June 14, 2024

It didnt' help, still getting:

Error executing vim.schedule lua callback: Vim:E475: Invalid value for argument cmd: '/home/krion/.local/share/nvim/plugged/cmp-tabnine/
binaries/4.0.60/^[[4 qx86_64-unknown-linux-musl/TabNine' is not executable
stack traceback:
        [C]: in function 'jobstart'
        ...hare/nvim/plugged/cmp-tabnine/lua/cmp_tabnine/source.lua:234: in function '_on_exit'
        ...hare/nvim/plugged/cmp-tabnine/lua/cmp_tabnine/source.lua:135: in function 'new'
        .../share/nvim/plugged/cmp-tabnine/lua/cmp_tabnine/init.lua:8: in function <.../share/nvim/plugged/cmp-tabnine/lua/cmp_tabnine/i
nit.lua:7>

from cmp-tabnine.

tzachar avatar tzachar commented on June 14, 2024

What is the output of

> \ls -al /home/krion/.local/share/nvim/plugged/cmp-tabnine/binaries/4.0.60/

from cmp-tabnine.

krionbsd avatar krionbsd commented on June 14, 2024

What is the output of

> \ls -al /home/krion/.local/share/nvim/plugged/cmp-tabnine/binaries/4.0.60/
❯ ls -al /home/krion/.local/share/nvim/plugged/cmp-tabnine/binaries/4.0.60/
total 12
drwxr-x--- 3 krion krion 4096 Feb  6 09:18 .
drwxr-x--- 3 krion krion 4096 Feb  6 09:18 ..
drwxr-x--- 2 krion krion 4096 Feb  6 09:18 x86_64-unknown-linux-musl

~
❯ ls -al /home/krion/.local/share/nvim/plugged/cmp-tabnine/binaries/4.0.60/x86_64-unknown-linux-musl
total 69328
drwxr-x--- 2 krion krion     4096 Feb  6 09:18 .
drwxr-x--- 3 krion krion     4096 Feb  6 09:18 ..
-rwxr-xr-x 1 krion krion 29564088 Jan 18 16:24 TabNine
-rwxr-xr-x 1 krion krion 13727248 Jan 18 16:24 TabNine-deep-cloud
-rwxr-xr-x 1 krion krion 15583056 Jan 18 16:24 TabNine-deep-local
-rwxr-xr-x 1 krion krion 12101976 Jan 18 16:24 WD-TabNine

from cmp-tabnine.

tzachar avatar tzachar commented on June 14, 2024

so where does the ^[[4 q comes from in /home/krion/.local/share/nvim/plugged/cmp-tabnine/binaries/4.0.60/^[[4 qx86_64-unknown-linux-musl/TabNine ??

Can you try and debug the code which tries to find the most recent binary?

from cmp-tabnine.

tzachar avatar tzachar commented on June 14, 2024

can you give me the :messages after applying the following diff:

diff --git a/lua/cmp_tabnine/source.lua b/lua/cmp_tabnine/source.lua
index a879630..824b69d 100644
--- a/lua/cmp_tabnine/source.lua
+++ b/lua/cmp_tabnine/source.lua
@@ -46,6 +46,7 @@ local function script_path()
   if is_win() then
     str = str:gsub('/', '\\')
   end
+  dump('script_path:', str:match('(.*' .. get_path_separator() .. ')'))
   return str:match('(.*' .. get_path_separator() .. ')')
 end
 
@@ -55,6 +56,7 @@ local function get_parent_dir(path)
   -- if path has separator at end, remove it
   path = path:gsub(separator .. '*$', '')
   local parent_dir = path:match(pattern) .. separator
+  dump('get_parent_dir:', {separator=separator, pattern=pattern, path=path, parent_dir=parent_dir})
   return parent_dir
 end
 
@@ -89,6 +91,7 @@ end
 -- locate the binary here, as expand is relative to the calling script name
 local function binary()
   local versions_folders = fn.globpath(binaries_folder, '*', false, true)
+  dump('binary:', {versions_folders=versions_folders})
   local versions = {}
   for _, path in ipairs(versions_folders) do
     for version in string.gmatch(path, '([0-9.]+)$') do
@@ -97,6 +100,7 @@ local function binary()
       end
     end
   end
+  dump('binary, versions:', versions)
   table.sort(versions, function(a, b)
     return stralnumcmp(a.version, b.version) < 0
   end)
@@ -105,6 +109,7 @@ local function binary()
     vim.notify(string.format('cmp-tabnine: Cannot find installed TabNine. Please run install.%s', (is_win() and 'ps1' or 'sh')))
     return
   end
+  dump('binary, lates:', latest)
 
   local platform = nil
   local arch, _ = string.gsub(fn.system('uname -m'), '\n$', '')
@@ -122,6 +127,8 @@ local function binary()
   elseif fn.has('unix') == 1 then
     platform = arch .. '-unknown-linux-musl'
   end
+  dump('binary, platform:', platform)
+  dump('binary, return:', {path=latest.path, platform=platform, ret=latest.path .. '/' .. platform .. '/' .. 'TabNine'})
   return latest.path .. '/' .. platform .. '/' .. 'TabNine'
 end
 

from cmp-tabnine.

krionbsd avatar krionbsd commented on June 14, 2024

I think I found the reason why it's failing, I applied recently echo -e -n "\x1b[\x34 q" into ~/.zshenv to get underline cursor for xterm, so it seems it did break tabnine plugin for whatever reasons, maybe we have to ignore echo invocations from ~/.bash_rc or ~/.zshrc[env] 🤷 But anyway thanks for your support and service.

from cmp-tabnine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.