aboutsummaryrefslogtreecommitdiffstats
path: root/lua/plugins/cmp-ai.lua
blob: 5431187fc4c6b267381a402b6b28c27ccd8ec9ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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,
}