-
Notifications
You must be signed in to change notification settings - Fork 155
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
Failed to acquire lock for frecency when Chinese-English mixed input #936
Comments
I've constructed an minimal setup with LSP and blinks only, the problem still -- blink.lua
return {
"saghen/blink.cmp",
opts = {
sources = {
-- default = { "lsp", "path", "luasnip", "buffer", "ripgrep", "lazydev" },
default = { "lsp", "path", "buffer" },
cmdline = {},
providers = {
lsp = {
min_keyword_length = 2,
fallbacks = { "ripgrep", "buffer" },
--- @param items blink.cmp.CompletionItem[]
transform_items = function(_, items)
-- demote snippets
for _, item in ipairs(items) do
if item.kind == require("blink.cmp.types").CompletionItemKind.Snippet then
item.score_offset = item.score_offset - 3
end
end
return items
end,
},
},
},
},
} The problem still holds 2025-01-08.04.33.36.movBTW, 你好 in Chinese means hello. |
I've checked for newest blink-cmp, the problem still holds under the minimal configuration |
If I set |
After reading I think let line_prefix = line.chars().take(line_range.0).collect::<String>();
let text_prefix = item_text.chars().take(text_range.0).collect::<String>(); should be replaced with let line_prefix = &line[..line_range.0];
let text_prefix = &item_text[..text_range.0]; because regex |
Similar problem when use Hungarian characters on typescript comment.
Using LazyVim and default config. |
Make sure you have done the following
blink.cmp
<C-k>
on https://cmp.saghen.dev)Bug Description
Hello everyone, I am a new user of blink-cmp for LaTeX writing. In addition to the basic texlab LSP, I have also configured a Chinese LSP rime-ls for mixed Chinese and English input.
The speed of blink-cmp is very fast! Many thanks to the developers for their thoughtful work. However, I am now encountering an issue, specifically:
When I input a mixed Chinese-English string like
你好\text{nihao}
, I get the following error:Screenshot as follows:
After deleting the string, the error keeps occurring even if I type pure English:
Unless I restart neovim, this issue will persist.
This makes it unusable. After testing, it is strongly related to a segment of my LSP source configuration. As long as the
transform_items
table is removed, the issue is resolved. However, it's important for the Chinese input LSP setup, so I wander if there is a way to solve the issue while keeping this configuration.Even if I use the built-in Chinese input method of my computer, the same issue occurs as long as this configuration is added. Any help would be greatly appreciated!
P.S. I've tried to disable fuzzy by set
however, the issue still exists.
Relevant configuration
neovim
versionNVIM v0.10.3 Build type: Release LuaJIT 2.1.1734355927
blink.cmp
versionv0.9.3
The text was updated successfully, but these errors were encountered: