From e6fdffe1cea46cd5a77a7f5a68ff9155d3a68e40 Mon Sep 17 00:00:00 2001 From: Thomas Alcala Schneider Date: Fri, 24 Mar 2023 19:39:56 +0100 Subject: [PATCH] feat: add cmp sources --- lua/custom/plugins/cmp-copilot.lua | 12 ++++++++++++ lua/custom/plugins/cmp-nvim-lsp.lua | 11 ++++++++++- lua/custom/plugins/cmp-path.lua | 13 +++++++++++-- lua/custom/plugins/cmp-tabnine.lua | 17 +++++++++++++---- 4 files changed, 46 insertions(+), 7 deletions(-) create mode 100644 lua/custom/plugins/cmp-copilot.lua diff --git a/lua/custom/plugins/cmp-copilot.lua b/lua/custom/plugins/cmp-copilot.lua new file mode 100644 index 00000000..2b351188 --- /dev/null +++ b/lua/custom/plugins/cmp-copilot.lua @@ -0,0 +1,12 @@ +return { + 'hrsh7th/cmp-copilot', + config = function() + local cmp = require 'cmp' + local config = cmp.get_config() + table.insert(config.sources, { + name = 'copilot', + option = {}, + }) + cmp.setup(config) + end, +} diff --git a/lua/custom/plugins/cmp-nvim-lsp.lua b/lua/custom/plugins/cmp-nvim-lsp.lua index 767312c3..0eed532e 100644 --- a/lua/custom/plugins/cmp-nvim-lsp.lua +++ b/lua/custom/plugins/cmp-nvim-lsp.lua @@ -1,3 +1,12 @@ return { - "hrsh7th/cmp-nvim-lsp", + 'hrsh7th/cmp-nvim-lsp', + config = function() + local cmp = require 'cmp' + local config = cmp.get_config() + table.insert(config.sources, { + name = 'nvim_lsp', + option = {}, + }) + cmp.setup(config) + end, } diff --git a/lua/custom/plugins/cmp-path.lua b/lua/custom/plugins/cmp-path.lua index f4cfb4ad..95249323 100644 --- a/lua/custom/plugins/cmp-path.lua +++ b/lua/custom/plugins/cmp-path.lua @@ -1,3 +1,12 @@ return { - "hrsh7th/cmp-path" -} \ No newline at end of file + 'hrsh7th/cmp-path', + config = function() + local cmp = require 'cmp' + local config = cmp.get_config() + table.insert(config.sources, { + name = 'path', + option = {}, + }) + cmp.setup(config) + end, +} diff --git a/lua/custom/plugins/cmp-tabnine.lua b/lua/custom/plugins/cmp-tabnine.lua index ee5d2f90..4deaad9e 100644 --- a/lua/custom/plugins/cmp-tabnine.lua +++ b/lua/custom/plugins/cmp-tabnine.lua @@ -1,5 +1,14 @@ return { - "tzachar/cmp-tabnine", - build = "./install.sh", - dependencies = {"hrsh7th/nvim-cmp"} -} \ No newline at end of file + 'tzachar/cmp-tabnine', + build = './install.sh', + dependencies = { 'hrsh7th/nvim-cmp' }, + config = function() + local cmp = require 'cmp' + local config = cmp.get_config() + table.insert(config.sources, { + name = 'tabnine', + option = {}, + }) + cmp.setup(config) + end, +}