-
Notifications
You must be signed in to change notification settings - Fork 151
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
Vim's default keymap 'o' will aways trigger cmp window at a blank new line #228
Comments
That's bizarre, does it happen on all LSPs? |
|
It seems like an incompatibility with one of your plugins. Are you able to reproduce this on a fresh neovim instance with no other plugins? |
Now I've found the problem. I remapped my esc to 'jk' and whenever I use this keymap to exit from the insert mode the next time pressing 'o' will trigger the window. Simply pressing esc to exit will not have such behavior. Do you know if there's a way to continue to use my keymap? |
I can take a look if you can create a minimal reproduction ( |
vim.loader.enable()
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
vim.g.mapleader = " "
require("lazy").setup({
{
'saghen/blink.cmp',
lazy = false,
dependencies = 'rafamadriz/friendly-snippets',
version = 'v0.*',
opts = {
keymap = {
['<C-e>'] = { 'hide' },
['<CR>'] = { 'select_and_accept', 'fallback' },
['<C-k>'] = { 'select_prev', 'fallback' },
['<C-j>'] = { 'select_next', 'fallback' },
['<M-j>'] = { 'snippet_forward', 'fallback' },
['<M-k>'] = { 'snippet_backward', 'fallback' },
},
highlight = {
use_nvim_cmp_as_default = true,
},
nerd_font_variant = 'mono',
accept = { auto_brackets = { enabled = false } },
trigger = {
signature_help = { enabled = false },
completion = {
show_in_snippet = true,
}
},
},
},
{
"max397574/better-escape.nvim",
config = function()
require("better_escape").setup{
mapping = { "kj", "jk", }, -- a table with mappings to use
timeout = 200, -- the time in which the keys must be hit in ms. Use option timeoutlen by default
clear_empty_lines = false, -- clear line after escaping if there is only whitespace
keys = "<Esc>", -- keys used for escaping, if it is a function will use the result everytime
}
end,
},
}) out.mp4While it does seem like a better-escape issue. If I use nvim's builtin keymap to map "kj" then blink works correctly. |
+1 I'm having the exact same issue as @dddddjent. Disabling better-escape and using builtin keymaps fixes my issue as well. |
Make sure you have done the following
blink.cmp
Bug Description
It always triggers a completion window when I type 'o' to enter the insert mode to add a new line. After going through all the possible options in the trigger section, I still could not disable this behavior. This doesn't happen if I use 'i' or 'a' to enter insert mode. Is this what it is supposed to be? thx
Relevant configuration
neovim version
v0.10.0
blink.cmp
version: branch, tag, or commitmain
The text was updated successfully, but these errors were encountered: