Updated 7. Contoh Custom Plugins (markdown)

Asep Komarudin 2023-03-03 07:01:46 +07:00
parent f1006eba28
commit 324c946cea

@ -1400,22 +1400,39 @@ return {
["<Down>"] = cmp.mapping(cmp.mapping.select_next_item(), { "i", "c" }), ["<Down>"] = cmp.mapping(cmp.mapping.select_next_item(), { "i", "c" }),
["<Tab>"] = cmp.mapping(cmp.mapping.select_next_item(), { "i", "c" }), ["<Tab>"] = cmp.mapping(cmp.mapping.select_next_item(), { "i", "c" }),
} }
-- Use buffer source for `/`. -- Use buffer source for `/`.
cmp.setup.cmdline("/", { cmp.setup.cmdline("/", {
preselect = "none",
completion = {
completeopt = "menu,preview,menuone,noselect",
},
mapping = mapping, mapping = mapping,
sources = { sources = {
{ name = "buffer" }, { name = "buffer" },
}, },
experimental = {
ghost_text = true,
native_menu = false,
},
}) })
-- Use cmdline & path source for ':'. -- Use cmdline & path source for ':'.
cmp.setup.cmdline(":", { cmp.setup.cmdline(":", {
preselect = "none",
completion = {
completeopt = "menu,preview,menuone,noselect",
},
mapping = mapping, mapping = mapping,
sources = cmp.config.sources({ sources = cmp.config.sources({
{ name = "path" }, { name = "path" },
}, { }, {
{ name = "cmdline" }, { name = "cmdline" },
}), }),
experimental = {
ghost_text = true,
native_menu = false,
},
}) })
end, end,
}, },