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 pressing "=" with lua language server enabled #1000

Open
2 tasks done
gassiss opened this issue Jan 12, 2025 · 2 comments
Open
2 tasks done

error when pressing "=" with lua language server enabled #1000

gassiss opened this issue Jan 12, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@gassiss
Copy link

gassiss commented Jan 12, 2025

Make sure you have done the following

  • Updated to the latest version of blink.cmp
  • Searched for existing issues and documentation (try <C-k> on https://cmp.saghen.dev)

Bug Description

hey! decided to try out blink after hearing so many good things about it. I'm loving it so far! very fast and easy to configure!

Having issues setting up the lua language server though. Whenever I type = I get the error message below:

Error executing vim.schedule lua callback: bad argument #3: error converting Lua string to String (invalid utf-8 sequence of 1 b
ytes from index 8)
stack traceback:
        [C]: in function 'fuzzy_matched_indices'
        ....cmp/lua/blink/cmp/completion/windows/render/context.lua:23: in function 'get_from_items'
        ...ink.cmp/lua/blink/cmp/completion/windows/render/init.lua:57: in function 'draw'
        ...lazy/blink.cmp/lua/blink/cmp/completion/windows/menu.lua:55: in function 'open_with_items'
        ...ta/nvim/lazy/blink.cmp/lua/blink/cmp/completion/init.lua:61: in function 'callback'
        .../nvim/lazy/blink.cmp/lua/blink/cmp/lib/event_emitter.lua:28: in function 'emit'
        ...ta/nvim/lazy/blink.cmp/lua/blink/cmp/completion/list.lua:94: in function 'show'
        ...ta/nvim/lazy/blink.cmp/lua/blink/cmp/completion/init.lua:53: in function <...ta/nvim/lazy/blink.cmp/lua/blink/cmp/com
pletion/init.lua:29>

It happens even in the following repro.lua
with the basic config provided in the docs

Thanks for all the work in this project! ⭐

Relevant configuration

repro.lua

neovim version

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

blink.cmp version

version 0.10.0                      
tag     v0.10.0                      
branch  main                      
commit  1cc3b1a
@gassiss gassiss added the bug Something isn't working label Jan 12, 2025
@Saghen
Copy link
Owner

Saghen commented Jan 12, 2025

Do you have any special characters in the buffer you're testing? (emojis, accents, non-latin alphabets, etc) I believe that's triggering the error

@gassiss
Copy link
Author

gassiss commented Jan 12, 2025

no, it happens in the repro.lua file example as well. nvim -u repro.lua repro.lua and type = anywhere

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

2 participants