From 92b2689e6f11004e65376e84912e61b9e6c58827 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 9 Oct 2023 10:28:53 +0200 Subject: [PATCH] docs: simplify cmp-emoji example --- lua/plugins/example.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/plugins/example.lua b/lua/plugins/example.lua index 78a3370..f84ebdc 100644 --- a/lua/plugins/example.lua +++ b/lua/plugins/example.lua @@ -44,8 +44,7 @@ return { dependencies = { "hrsh7th/cmp-emoji" }, ---@param opts cmp.ConfigSchema opts = function(_, opts) - local cmp = require("cmp") - opts.sources = cmp.config.sources(vim.list_extend(opts.sources, { { name = "emoji" } })) + table.insert(opts.sources, { name = "emoji" }) end, },