Closed
Description
i have nvim-cmp installed and also cmp-tmux.
its configured like this:
local cmp = require("cmp")
cmp.setup({
snippet = {
expand = function(args)
require"luasnip".lsp_expand(args.body)
end
},
-- in this order they will appear in the box
sources = {
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = 'buffer' },
{ name = 'path' },
{ name = 'nvim_lua' },
{
name = 'tmux',
opts = {
all_panes = false,
label = '[tmux]',
trigger_characters = { '.' },
trigger_characters_ft = {} -- { filetype = { '.' } }
}
}
},
mapping = {
-- ['<C-d>'] = cmp.mapping.scroll_docs(-4),
-- ['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.close(),
-- ['<CR>'] = cmp.mapping.confirm({
-- select = true,
-- behavior = cmp.ConfirmBehavior.Replace,
-- }),
['<CR>'] = cmp.mapping.abort(),
['<tab>'] = cmp.mapping.confirm({
select = true,
behavior = cmp.ConfirmBehavior.Replace,
}),
},
formatting = {
format = function(entry, vim_item)
-- fancy icons and a name of kind
vim_item.kind = require("lspkind").presets.default[vim_item.kind] .. " " .. vim_item.kind
-- set a name for each source
vim_item.menu = ({
buffer = "[Buffer]",
nvim_lsp = "[LSP]",
luasnip = "[LuaSnip]",
nvim_lua = "[Lua]",
latex_symbols = "[Latex]",
-- https://github.com/andersevenrud/compe-tmux/issues/6
tmux = "[tmux]"
})[entry.source.name]
return vim_item
end,
},
})
everything is fine.
but i dont understand where should i get completion from this plugin.
i was editing a tmux.conf
file and there where no "tmux completion".
a better question is: what do you mean by tmux completion
? tmux symbols completion? completion for commands?