From 7ca6e531d23bd04cea259c76e8cf27e648cf701f Mon Sep 17 00:00:00 2001 From: JP Appel Date: Sat, 11 May 2024 00:59:23 -0400 Subject: add emoji completitions, change showtabline --- nvim/init.lua | 2 +- nvim/lua/plugins/emoji.lua | 15 +++++++++++++++ nvim/lua/plugins/nvim-cmp.lua | 22 ++++++++++++---------- nvim/lua/profiles.lua | 2 ++ 4 files changed, 30 insertions(+), 11 deletions(-) create mode 100644 nvim/lua/plugins/emoji.lua (limited to 'nvim') diff --git a/nvim/init.lua b/nvim/init.lua index 45e86bd..08a8038 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -44,7 +44,7 @@ vim.api.nvim_command('aunmenu PopUp.-1-') -- Status line vim.opt.laststatus = 3 -vim.opt.showtabline = 2 +vim.opt.showtabline = 1 vim.opt.list = true vim.opt.listchars = "tab:▸ ,trail:·,nbsp:·,extends:+,lead:·" diff --git a/nvim/lua/plugins/emoji.lua b/nvim/lua/plugins/emoji.lua new file mode 100644 index 0000000..7f3d9ce --- /dev/null +++ b/nvim/lua/plugins/emoji.lua @@ -0,0 +1,15 @@ +return { + "allaman/emoji.nvim", + ft = { + "markdown", + "pandoc" + }, + dependencies = { + "hrsh7th/nvim-cmp", + "nvim-telescope/telescope.nvim", + }, + config = function() + require("emoji").setup({ enable_cmp_integration = true }) + require("telescope").load_extension("emoji") + end +} diff --git a/nvim/lua/plugins/nvim-cmp.lua b/nvim/lua/plugins/nvim-cmp.lua index b560732..ac588f6 100644 --- a/nvim/lua/plugins/nvim-cmp.lua +++ b/nvim/lua/plugins/nvim-cmp.lua @@ -68,11 +68,12 @@ cmp_plugin.config = function() end, }, sources = { - {name = 'path'}, - {name = 'nvim_lsp', keyword_length = 3}, - {name = 'buffer', keyword_length = 3}, - {name = 'luasnip', keyword_length = 2}, - {name = 'cmp_pandoc' }, + { name = 'path'}, + { name = 'nvim_lsp'}, + { name = 'buffer', keyword_length = 4}, + { name = 'luasnip'}, + { name = 'cmp_pandoc' }, + { name = 'emoji' }, }, window = { documentation = { @@ -91,7 +92,8 @@ cmp_plugin.config = function() buffer = '[Buffer]', path = '[Path]', nvim_lua = '[Lua]', - cmp_pandoc = '[Pandoc]' + cmp_pandoc = '[Pandoc]', + emoiji = '[Emoji]' } item.menu = menu[entry.source.name] @@ -255,12 +257,12 @@ return { end }, sources = { - { name = 'nvim_lsp', keyword_length = 3 }, - { name = 'luasnip', keyword_length = 2 }, + { name = 'nvim_lsp'}, + { name = 'luasnip'}, { name = 'path' }, { name = 'nvim_lua' }, - { name = 'buffer', keyword_length = 3 } - -- TODO: add more sources + { name = 'buffer', keyword_length = 4 }, + { name = 'emoji' } }, window = { -- TODO: style cmp windows diff --git a/nvim/lua/profiles.lua b/nvim/lua/profiles.lua index f797a3a..eefc862 100644 --- a/nvim/lua/profiles.lua +++ b/nvim/lua/profiles.lua @@ -14,6 +14,8 @@ local getDefaultmetatable = { } -- Create a table for each machine with a default value +-- @param default the default value for each profile +-- @return a table with each machine as a key and a default -- current machines: nest, Goose.local M.createProfiles = function(default) local profiles = {} -- cgit v1.2.3