From 15ea0d5ae7c393493407ffb0c151656cc27ee01b Mon Sep 17 00:00:00 2001 From: Elvis Claros Castro Date: Fri, 30 Aug 2024 15:03:49 -0300 Subject: Feat: suport for cmp-ai --- lua/plugins/cmp-ai.lua | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 lua/plugins/cmp-ai.lua (limited to 'lua/plugins/cmp-ai.lua') diff --git a/lua/plugins/cmp-ai.lua b/lua/plugins/cmp-ai.lua new file mode 100644 index 0000000..5431187 --- /dev/null +++ b/lua/plugins/cmp-ai.lua @@ -0,0 +1,59 @@ +return { + "ElvisClaros/cmp-ai", + dependencies = "nvim-lua/plenary.nvim", + config = function() + local cmp_ai = require "cmp_ai.config" + cmp_ai:setup { + max_lines = 10, + provider = "LlamaCPP", + provider_options = { + model = "null", + }, + notify = false, + notify_callback = function(msg) + vim.notify(msg) + end, + run_on_every_keystroke = true, + ignored_file_types = { + -- default is not to ignore + -- uncomment to ignore in lua: + -- lua = true + }, + } + + -- cmp_ai:setup { + -- max_lines = 10, + -- provider = "Ollama", + -- provider_options = { + -- model = "tinyllama:1.1b", + -- }, + -- notify = false, + -- notify_callback = function(msg) + -- vim.notify(msg) + -- end, + -- run_on_every_keystroke = true, + -- ignored_file_types = { + -- -- default is not to ignore + -- -- uncomment to ignore in lua: + -- -- lua = true + -- }, + -- } + -- cmp_ai:setup { + -- max_lines = 10, + -- provider = "OpenAI", + -- provider_options = { + -- model = "gpt-4", + -- }, + -- notify = true, + -- notify_callback = function(msg) + -- vim.notify(msg) + -- end, + -- run_on_every_keystroke = true, + -- ignored_file_types = { + -- -- default is not to ignore + -- -- uncomment to ignore in lua: + -- -- lua = true + -- }, + -- } + end, +} -- cgit v1.2.3