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
When using nvim-cmp, how do I get this gray box to not appear when scrolling through words? #494
Comments
I don't see that behavior here with nvim-cmp. Parts of the word appearing at the end looks wonky too, so maybe a misconfiguration? Here's my next/prev mapping for Configlocal has_words_before = function()
if vim.api.nvim_buf_get_option(0, "buftype") == "prompt" then
return false
end
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and
vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
end
cmp.setup() {
mapping = {
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
elseif has_words_before() then -- If tabbing after text in insert mode
cmp.complete() -- Open cmp menu (normally Tab wouldn't trigger this)
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { "i", "s" }),
["<Cr>"] = cmp.mapping.confirm()
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think it's related to tokyonight, if I change the color scheme to default or others it's transparent.
Here is a video since I'm having a hell of a time putting the issue into words, clearly. I'm a bit new to neovim, so I'm sure I'm overlooking something
The text was updated successfully, but these errors were encountered: