Can't exit path completion with no item match and even with a whitespace
Make sure you have done the following
- [x] Updated to the latest version of
blink.cmp - [x] Searched for existing issues and documentation (try
<C-k>on https://cmp.saghen.dev)
Bug Description
- touch test
- touch mini.lua
- nvim --clean -u mini.lua test
- input
/trigger path completion, it's ok. then we input.but completion menu doesn't disappear.
- and we input a whitespace, the menu finally disappear. but then we input
d, the path completion triggered again.
mini.lua
-- Run this file as `nvim --clean -u minimal.lua`
for name, url in pairs {
-- ADD PLUGINS _NECESSARY_ TO REPRODUCE THE ISSUE, e.g:
'https://github.com/Saghen/blink.cmp',
} do
local install_path = vim.fn.fnamemodify('nvim_issue/' .. name, ':p')
if vim.fn.isdirectory(install_path) == 0 then
vim.fn.system { 'git', 'clone', '--depth=1', url, install_path }
end
vim.opt.runtimepath:append(install_path)
end
-- ADD INIT.LUA SETTINGS _NECESSARY_ FOR REPRODUCING THE ISSUE
require("blink.cmp").setup({
keymap = {
preset = "super-tab",
["Tab"] = { 'accept', 'fallback' },
["<C-y>"] = { 'accept', 'fallback' },
},
fuzzy = { prebuilt_binaries = { force_version = "v0.11.0" } },
})
Relevant configuration
neovim version
NVIM v0.11.0-dev-1664+ge71d2c817d Build type: Release LuaJIT 2.1.1736781742 Run "nvim -V1 -v" for more info
blink.cmp version
main
We allow /. since this would mark the beginning of a hidden folder, and enables showing hidden folders, if they're disabled by default. However the /. b definitely seems odd. I've changed the behavior such that if the current path segment contains a space, we don't return any items, but previous path segments may contain spaces.
Allowed: ~/example foo/b
Not allowed: ~/example foo
Thanks for your great plugin and quick fix!
We allow
/.since this would mark the beginning of a hidden folder, and enables showing hidden folders, if they're disabled by default.
This sounds reasonable, but I don't have a hidden directory or file in my root directory, and path source still brings up the completion menu, which doesn't seem to match my intuition.
Good point, we should still match on the . but we don't have a great way to do this atm. Might need #657