Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when starting Neovim. Suggestions and add-ons do not work. #669

Closed
2 tasks done
Re3w opened this issue Dec 20, 2024 · 11 comments
Closed
2 tasks done

Error when starting Neovim. Suggestions and add-ons do not work. #669

Re3w opened this issue Dec 20, 2024 · 11 comments
Labels
bug Something isn't working

Comments

@Re3w
Copy link

Re3w commented Dec 20, 2024

Make sure you have done the following

  • I have updated to the latest version of blink.cmp
  • I have read the README

Bug Description

After running neovim (I use lazyvim), I get an error in python, javascript, etc files.

Startup error Python file

Error executing luv callback:
..._nvim.a7hRJJG/usr/share/nvim/runtime/lua/vim/_system.lua:244: EACCES: permission denied                                                                                   
stack traceback:                                                                                                                                                             
        [C]: in function 'error'                                                                                                                                             
        ..._nvim.a7hRJJG/usr/share/nvim/runtime/lua/vim/_system.lua:244: in function 'spawn'                                                                                 
        ..._nvim.a7hRJJG/usr/share/nvim/runtime/lua/vim/_system.lua:335: in function 'system'                                                                                
        ...are/nvim/lazy/blink.cmp/lua/blink/cmp/fuzzy/download.lua:129: in function <...are/nvim/lazy/blink.cmp/lua/blink/cmp/fuzzy/download.lua:116>                       
        [C]: in function 'wait'                                                                                                                                              
        ..._nvim.a7hRJJG/usr/share/nvim/runtime/lua/vim/_system.lua:98: in function 'wait'                                                                                   
        ...hRJJG/usr/share/nvim/runtime/lua/vim/provider/python.lua:29: in function 'import_module'                                                                          
        ...hRJJG/usr/share/nvim/runtime/lua/vim/provider/python.lua:47: in function 'check_for_module'                                                                       
        ...hRJJG/usr/share/nvim/runtime/lua/vim/provider/python.lua:89: in function <...hRJJG/usr/share/nvim/runtime/lua/vim/provider/python.lua:80>                         
        [C]: in function 'nvim_cmd'                                                                                                                                          
        .../.mount_nvim.a7hRJJG/usr/share/nvim/runtime/filetype.lua:36: in function <.../.mount_nvim.a7hRJJG/usr/share/nvim/runtime/filetype.lua:35>                         
        [C]: in function 'nvim_buf_call'                                                                                                                                     
        .../.mount_nvim.a7hRJJG/usr/share/nvim/runtime/filetype.lua:35: in function <.../.mount_nvim.a7hRJJG/usr/share/nvim/runtime/filetype.lua:10>

Startup error JS file

Error executing luv callback:
..._nvim.aEf33eE/usr/share/nvim/runtime/lua/vim/_system.lua:244: EACCES: permission denied                                                                                   
stack traceback:                                                                                                                                                             
        [C]: in function 'error'                                                                                                                                             
        ..._nvim.aEf33eE/usr/share/nvim/runtime/lua/vim/_system.lua:244: in function 'spawn'                                                                                 
        ..._nvim.aEf33eE/usr/share/nvim/runtime/lua/vim/_system.lua:335: in function 'system'                                                                                
        ...are/nvim/lazy/blink.cmp/lua/blink/cmp/fuzzy/download.lua:129: in function <...are/nvim/lazy/blink.cmp/lua/blink/cmp/fuzzy/download.lua:116>

checkhealth

     blink.cmp: require("blink.cmp.health").check()                                                                                                                        
                                                                                                                                                                           
     blink.cmp healthcheck
     - ERROR curl is not installed
     - OK git is installed
     - OK Your system is supported by pre-built binaries (x86_64-unknown-linux-gnu)
     - ERROR Failed to run healthcheck for "blink.cmp" plugin. Exception:
       ...local/share/nvim/lazy/blink.cmp/lua/blink/cmp/health.lua:28: bad argument #2 to 'fs_stat' (function or callable table expected, got number)

After skipping it, the suggestions do not work. Default blink configuration from lazyvim

Relevant configuration

No response

neovim version

NVIM v0.10.2 Build type: Release LuaJIT 2.1.1713484068 Run "nvim -V1 -v" for more info

blink.cmp version: branch, tag, or commit

branch main
tag v0.7.6
commit ae5a4ce

@Re3w Re3w added the bug Something isn't working label Dec 20, 2024
@HertelP
Copy link

HertelP commented Dec 20, 2024

I have the same error:
2024-12-20-200553_hyprshot

@the-fuckin-nobody
Copy link

 - ERROR curl is not installed

Try installing curl and then reinstall blink.cmp .

@HertelP
Copy link

HertelP commented Dec 20, 2024

 - ERROR curl is not installed

Try installing curl and then reinstall blink.cmp .

I Have curl installed and reinstalled blink.cmp multiple times and it still won't work.

@Re3w
Copy link
Author

Re3w commented Dec 20, 2024

 - ERROR curl is not installed

Try installing curl and then reinstall blink.cmp .

I also have curl installed, but I specifically changed the permissions on it because my organization prohibits the use of outside downloads.

What is being downloaded through curl? Is there any way to configure a proxy?

@Saghen
Copy link
Owner

Saghen commented Dec 20, 2024

The prebuilt binary for the fuzzy matching. You could:

  1. Build it from source with build = 'cargo build --release'
  2. Or download from the releases and place it at ~/.local/share/nvim/lazy/blink.cmp/target/release/libblink_cmp_fuzzy.so

@Saghen
Copy link
Owner

Saghen commented Dec 20, 2024

@HertelP You seem to be having a different issue, are you on neovim 0.10+?

@the-fuckin-nobody
Copy link

@Saghen the error is there because gsub also adds the number of replacements to the result.

or vim.uv.fs_stat(string.gsub(download.lib_path, 'libblink_cmp_fuzzy', 'blink_cmp_fuzzy'))

and it is due to the above line.

It can be fixed with replacing this line with:

    or vim.uv.fs_stat(string.gsub(download.lib_path, 'libblink_cmp_fuzzy', 'blink_cmp_fuzzy'):match('(.+)%s*%d*$'))

Saghen added a commit that referenced this issue Dec 20, 2024
@Saghen
Copy link
Owner

Saghen commented Dec 20, 2024

Ahh thanks! Fixed that on main

@rythmatic
Copy link

rythmatic commented Dec 20, 2024

I had the same error with 0.7.6, which got resolved by building the fuzzy lib manually. However I just upgraded to 0,8.0 and now it fails in the same place.. this time because download.lib_path is null:

  • ERROR Failed to run healthcheck for "blink.cmp" plugin. Exception:
    ...local/share/nvim/lazy/blink.cmp/lua/blink/cmp/health.lua:27: bad argument # 1 to 'fs_stat' (string expected, got nil)

@Saghen Saghen closed this as not planned Won't fix, can't repro, duplicate, stale Dec 20, 2024
@Saghen
Copy link
Owner

Saghen commented Dec 20, 2024

Root issue was solved by manually installing or building since the OP couldn't use curl. The issues around health check were solved on main

@HertelP
Copy link

HertelP commented Dec 21, 2024

@Saghen
My issue wasn't fixed after the update but i found the error on my side.
In case anyone is having the same issue:
I made a switch from packer to lazy and the plugin was trying to load it from the /site/pack/packer directory which caused the error. I deleted the folder .local/share/nvim/site folder and it worked as expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants