-
Notifications
You must be signed in to change notification settings - Fork 203
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
Using a Blob as a string
Error when show document of function bytes_to_long
#1320
Closed
2 tasks done
Labels
bug
Something isn't working
Comments
Whoops, meant to mark a different issue as duplicate |
It's possible your neovim nightly is out of date. If that doesn't resolve it, send over a repro.lua and I can take another look, closing for now |
I have updated my neovim to v0.11.0-dev-1893+g948179cb19. But the problem still exists. Here is the -- Run with `nvim -u repro.lua`
vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()
---@diagnostic disable-next-line: missing-fields
require("lazy.minit").repro({
spec = {
{
"saghen/blink.cmp",
-- please test on `main` if possible
-- otherwise, remove this line and set `version = '*'`
build = "cargo build --release",
event = "InsertEnter",
dependencies = {
{ "L3MON4D3/LuaSnip", version = "v2.*" },
"xzbdmw/colorful-menu.nvim",
"nvim-tree/nvim-web-devicons",
"onsails/lspkind.nvim",
"folke/lazydev.nvim",
},
opts = {
completion = {
list = { selection = { auto_insert = false } },
keyword = { range = "full" },
accept = { auto_brackets = { enabled = true } },
documentation = { auto_show = true, auto_show_delay_ms = 50, window = { border = "single" } },
menu = {
border = "single",
scrollbar = false,
draw = {
-- Aligns the keyword you've typed to a component in the menu
align_to = "cursor", -- or 'none' to disable, or 'cursor' to align to the cursor
-- Left and right padding, optionally { left, right } for different padding on each side
padding = 1,
-- Gap between columns
gap = 1,
columns = {
{ "kind_icon", gap = 1 },
{ "label", "source_name", gap = 1 },
},
},
},
},
},
},
{
"neovim/nvim-lspconfig",
event = { "BufReadPost", "BufNewFile", "BufWritePre" },
dependencies = {
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",
-- "hrsh7th/cmp-nvim-lsp",
"saghen/blink.cmp",
},
opts = {},
config = function(_, opts)
local lspconfig = require("lspconfig")
local mason_lspconfig = require("mason-lspconfig")
local capabilities = require("blink.cmp").get_lsp_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true
capabilities.textDocument.foldingRange = {
dynamicRegistration = false,
lineFoldingOnly = true,
}
require("mason").setup({
ui = {
icons = {
package_installed = "✓",
package_pending = "➜",
package_uninstalled = "✗",
},
},
})
mason_lspconfig.setup({
ensure_installed = {
"pyright",
},
})
mason_lspconfig.setup_handlers({
-- default handler for installed servers
function(server_name)
lspconfig[server_name].setup({
capabilities = capabilities,
})
end,
["pyright"] = function()
lspconfig["pyright"].setup({
capabilities = capabilities,
})
end,
})
end,
},
},
}) |
soifou
added a commit
to soifou/blink.cmp
that referenced
this issue
Mar 4, 2025
Resolves scrollbar rendering issues when LSP servers (e.g., Pyright) sometimes return blob-type content in documentation. Converts blobs to strings before computing line widths to ensure accurate documentation window sizing. Fix Saghen#1320
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Make sure you have done the following
blink.cmp
<C-k>
on https://cmp.saghen.dev)Bug Description
i want to import function
bytes_to_long
from packagepycryptodome
in python as follows:When showing document of
bytes_to_long
, the document window seems weird and error is detected. I put the error in the following image. It seems that the size of document window cannot be calculated correctly.Is it a configuration issue, or due to the document?
The bug can be reproduced as follows. First, install pycryptodome with
pip3 install pycryptodome
. Then in neovim, type "from Crypto.Util.number import long_to_bytes, bytes_to_long".Relevant configuration
neovim
versionv0.11.0-dev-1636+ge3e1c1e765
blink.cmp
version18b352d
The text was updated successfully, but these errors were encountered: