From 2657cbbf33ed31fa794559388fc49eec1e821a38 Mon Sep 17 00:00:00 2001 From: Rokas Puzonas Date: Sun, 31 Oct 2021 18:27:44 +0200 Subject: [PATCH] feat: add emoji to auto completion --- lua/config/cmp.lua | 2 ++ lua/plugins.lua | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lua/config/cmp.lua b/lua/config/cmp.lua index 94442fe..c77aa8e 100644 --- a/lua/config/cmp.lua +++ b/lua/config/cmp.lua @@ -24,6 +24,7 @@ cmp.setup{ }) }, sources = { + { name = 'emoji', max_item_count = 10, keyword_length = 5 }, { name = 'nvim_lua' }, { name = 'nvim_lsp', max_item_count = 20 }, @@ -42,6 +43,7 @@ cmp.setup{ nvim_lua = "[api]", path = "[path]", luasnip = "[snip]", + emoji = "[emoji]" } } }, diff --git a/lua/plugins.lua b/lua/plugins.lua index 4887dc9..203f438 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -1,5 +1,6 @@ -local function usePlugins(use) +---@diagnostic disable-next-line: unused-local +local function usePlugins(use, use_rocks) -- Packer can manage itself use 'wbthomason/packer.nvim' @@ -102,6 +103,7 @@ local function usePlugins(use) use {'hrsh7th/cmp-buffer', after = 'nvim-cmp', requires = 'hrsh7th/nvim-cmp'} use {'hrsh7th/cmp-path', after = 'nvim-cmp', requires = 'hrsh7th/nvim-cmp'} use {'hrsh7th/cmp-cmdline', after = 'nvim-cmp', requires = 'hrsh7th/nvim-cmp'} + use {'hrsh7th/cmp-emoji', after = 'nvim-cmp', requires = 'hrsh7th/nvim-cmp'} use {'saadparwaiz1/cmp_luasnip', after = 'nvim-cmp', requires = {'L3MON4D3/LuaSnip', 'nvim-cmp'}} -- Color themes @@ -140,7 +142,6 @@ vim.cmd [[ local function bootstrap() local fn = vim.fn local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' - local packer_bootstrap if fn.empty(fn.glob(install_path)) > 0 then return fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path}) end