-
Notifications
You must be signed in to change notification settings - Fork 205
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
LuaSnip may disappear while inputting #1224
Labels
bug
Something isn't working
Comments
Could you create a minimal repro.lua for this? |
Open a -- Run with `nvim -u repro.lua`
local lazypath = ".repro/lazy.nvim"
---@diagnostic disable-next-line: undefined-field
if not (vim.uv or 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)
---@diagnostic disable-next-line: missing-fields
require('lazy').setup({
spec = {
{
'saghen/blink.cmp',
version = '*',
dependencies = {
{
'L3MON4D3/LuaSnip',
version = 'v2.*',
build = 'make install_jsregexp',
dependencies = {
'rafamadriz/friendly-snippets',
},
config = function()
require('luasnip.loaders.from_vscode').lazy_load()
end,
},
},
---@module 'blink.cmp'
---@type blink.cmp.Config
opts = {
keymap = {
preset = 'none',
['<cr>'] = { 'accept', 'fallback' },
['<tab>'] = { 'snippet_forward', 'fallback' },
['<s-tab>'] = { 'snippet_backward', 'fallback' },
['<c-u>'] = { 'scroll_documentation_up', 'fallback' },
['<c-d>'] = { 'scroll_documentation_down', 'fallback' },
['<c-j>'] = { 'select_next', 'fallback' },
['<c-k>'] = { 'select_prev', 'fallback' },
['<c-x>'] = { 'show', 'fallback' },
['<c-c>'] = { 'cancel', 'fallback' },
},
snippets = { preset = 'luasnip' },
sources = {
default = {
'lsp',
'snippets',
},
},
},
opts_extend = { 'sources.default' }
},
{
'neovim/nvim-lspconfig',
dependencies = {
'nvim-java/nvim-java',
},
config = function()
local lsp_capabilities = vim.lsp.protocol.make_client_capabilities()
lsp_capabilities = require('blink.cmp').get_lsp_capabilities(lsp_capabilities)
require('java').setup({
capabilities = lsp_capabilities,
root_markers = vim.g.root_markers,
jdk = {
auto_install = false,
},
})
local lspconfig = require('lspconfig')
lspconfig.jdtls.setup({
capabilities = lsp_capabilities,
handlers = {
['$/progress'] = function(_, _, _) end,
},
})
end,
},
},
}) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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
When I input
fore
, I can see thelua
snippets:But when I input
forea
, the completion menu just disappears:When I delete the
a
, I can see it again:It seems that when there are only
Snip
items in the completion menu, the completion menu will disappear.Relevant configuration
See blink_cmp.lua.
neovim
versionv0.10.4
blink.cmp
versionv0.12
The text was updated successfully, but these errors were encountered: