Closed yehuohan closed 5 months ago
{ 'hrsh7th/nvim-cmp', config = function() require('mason').setup({ install_root_dir = vim.env.DotVimLocal .. '/.mason' }) require('mason-lspconfig').setup({}) local lspconfig = require('lspconfig') local capabilities = require('cmp_nvim_lsp').default_capabilities() local opts = { function(server_name) lspconfig[server_name].setup({ capabilities = capabilities }) end, } require('mason-lspconfig').setup_handlers(opts) local cmp = require('cmp') cmp.setup({ mapping = { ['<M-i>'] = cmp.mapping(function() cmp.complete() end, { 'i' }), ['<M-j>'] = cmp.mapping(function() cmp.select_next_item() end, { 'i', 'c' }), ['<M-k>'] = cmp.mapping(function() cmp.select_prev_item() end, { 'i', 'c' }), }, sources = cmp.config.sources({ { name = 'nvim_lsp' } }), preselect = cmp.PreselectMode.None, }) end, dependencies = { 'williamboman/mason.nvim', 'williamboman/mason-lspconfig.nvim', 'neovim/nvim-lspconfig', 'hrsh7th/cmp-nvim-lsp', }, },
Like the picture showed. When typing Box::ne and select the first ne item, there's some extra ${} text inserted.
Box::ne
ne
${}
Type some text and select the first item.
No ${} text inserted when selecting the first item.
There's extra ${} text inserted when selecting the first item.
No response
Dup of #1800.
FAQ
Announcement
Minimal reproducible full config
Description
Like the picture showed. When typing
Box::ne
and select the firstne
item, there's some extra${}
text inserted.Steps to reproduce
Type some text and select the first item.
Expected behavior
No
${}
text inserted when selecting the first item.Actual behavior
There's extra
${}
text inserted when selecting the first item.Additional context
No response