From d2fdecf5ab37b2f2b9ec5456d9c0fc80f075ca70 Mon Sep 17 00:00:00 2001 From: listout Date: Fri, 17 Feb 2023 11:55:24 +0530 Subject: Revert "nvim: plugins: git souce for nvim-cmp" This reverts commit be9f5f7278658e70ad1294c77acb66d021218707. --- lua/plugins/cmp.lua | 17 ++++++----------- lua/plugins/plugins.lua | 1 - 2 files changed, 6 insertions(+), 12 deletions(-) (limited to 'lua/plugins') diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 68ca028..25bce4b 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -102,19 +102,14 @@ cmp.setup { { name = 'nvim_lua' }, }), } - -- Set configuration for specific filetype. -require("cmp").setup({ - sources = { - { name = "git" }, - { name = "buffer" }, - { name = "path" }, - -- more sources - } +cmp.setup.filetype('gitcommit', { + sources = cmp.config.sources({ + { name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it. + }, { + { name = 'buffer' }, + }) }) - -require("cmp_git").setup() - -- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore). require'cmp'.setup.cmdline('/', { completion = { autocomplete = false }, diff --git a/lua/plugins/plugins.lua b/lua/plugins/plugins.lua index 34d1b05..ec30d0e 100644 --- a/lua/plugins/plugins.lua +++ b/lua/plugins/plugins.lua @@ -52,7 +52,6 @@ return packer.startup(function(use) use {'saadparwaiz1/cmp_luasnip'} -- Snippets source for nvim-cmp use {'L3MON4D3/LuaSnip'} -- Snippets plugin use {"rafamadriz/friendly-snippets"} - use({"petertriho/cmp-git", requires = "nvim-lua/plenary.nvim"}) -- nvim-cmp source for git commits -- Show color under hex codes use {'norcalli/nvim-colorizer.lua'} -- cgit v1.2.3