From 0d662bdbee0e7dad14c5214c67b6bde9e074f6b2 Mon Sep 17 00:00:00 2001 From: James Karefylakis Date: Wed, 13 Mar 2024 08:12:35 +1100 Subject: [PATCH] Use `cmp-nvim-lua` as `nvim-cmp` source for neovim Lua API (#696) * Use cmp-nvim-lua as nvim-cmp source for neovim Lua API * Move the dependency to a more suitable place --- init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/init.lua b/init.lua index b9311f7..16431f5 100644 --- a/init.lua +++ b/init.lua @@ -676,6 +676,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 @@ -740,6 +743,7 @@ require('lazy').setup({ end, { 'i', 's' }), }, sources = { + { name = 'nvim_lua' }, { name = 'nvim_lsp' }, { name = 'copilot' }, { name = 'luasnip' },