diff --git a/7.-Contoh-Custom-Plugins.md b/7.-Contoh-Custom-Plugins.md index 3f2abdd..e594ed2 100644 --- a/7.-Contoh-Custom-Plugins.md +++ b/7.-Contoh-Custom-Plugins.md @@ -1400,22 +1400,39 @@ return { [""] = cmp.mapping(cmp.mapping.select_next_item(), { "i", "c" }), [""] = cmp.mapping(cmp.mapping.select_next_item(), { "i", "c" }), } + -- Use buffer source for `/`. cmp.setup.cmdline("/", { + preselect = "none", + completion = { + completeopt = "menu,preview,menuone,noselect", + }, mapping = mapping, sources = { { name = "buffer" }, }, + experimental = { + ghost_text = true, + native_menu = false, + }, }) -- Use cmdline & path source for ':'. cmp.setup.cmdline(":", { + preselect = "none", + completion = { + completeopt = "menu,preview,menuone,noselect", + }, mapping = mapping, sources = cmp.config.sources({ { name = "path" }, }, { { name = "cmdline" }, }), + experimental = { + ghost_text = true, + native_menu = false, + }, }) end, },