From 618a30bb497de35f6661cecc7b6182581acf111b Mon Sep 17 00:00:00 2001 From: jamylak Date: Tue, 5 Mar 2024 14:00:26 +1100 Subject: [PATCH 1/2] Use cmp-nvim-lua as nvim-cmp source for neovim Lua API --- init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/init.lua b/init.lua index 16d3c26b1ec..db3f1bc59cb 100644 --- a/init.lua +++ b/init.lua @@ -629,6 +629,9 @@ require('lazy').setup { dependencies = { -- Snippet Engine & its associated nvim-cmp source { + -- nvim-cmp source for neovim Lua API + -- so that things like vim.keymap.set, etc. are autocompleted + 'hrsh7th/cmp-nvim-lua', 'L3MON4D3/LuaSnip', build = (function() -- Build Step is needed for regex support in snippets @@ -708,6 +711,7 @@ require('lazy').setup { end, { 'i', 's' }), }, sources = { + { name = 'nvim_lua' }, { name = 'nvim_lsp' }, { name = 'luasnip' }, { name = 'path' }, From 1ce2db91491626dd29fc424ad10811b51318d416 Mon Sep 17 00:00:00 2001 From: jamylak Date: Tue, 12 Mar 2024 09:21:01 +1100 Subject: [PATCH 2/2] Move the dependency to a more suitable place --- init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index db3f1bc59cb..c4a947668ca 100644 --- a/init.lua +++ b/init.lua @@ -629,9 +629,6 @@ require('lazy').setup { dependencies = { -- Snippet Engine & its associated nvim-cmp source { - -- nvim-cmp source for neovim Lua API - -- so that things like vim.keymap.set, etc. are autocompleted - 'hrsh7th/cmp-nvim-lua', 'L3MON4D3/LuaSnip', build = (function() -- Build Step is needed for regex support in snippets @@ -650,6 +647,9 @@ require('lazy').setup { -- into multiple repos for maintenance purposes. 'hrsh7th/cmp-nvim-lsp', 'hrsh7th/cmp-path', + -- nvim-cmp source for neovim Lua API + -- so that things like vim.keymap.set, etc. are autocompleted + 'hrsh7th/cmp-nvim-lua', -- If you want to add a bunch of pre-configured snippets, -- you can use this plugin to help you. It even has snippets