-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathconfig.lua
90 lines (77 loc) · 2.6 KB
/
config.lua
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
Completion = {
handler = tools.completion_handler,
opts = {
-------------------------------------------------
--- ollama
-------------------------------------------------
url = "http://localhost:11434/v1/completions",
model = "qwen2.5-coder:1.5b",
api_type = "ollama",
------------------- end ollama ------------------
-------------------------------------------------
--- deepseek
-------------------------------------------------
-- url = "https://api.deepseek.com/beta/completions",
-- model = "deepseek-chat",
-- api_type = "deepseek",
-- fetch_key = function()
-- return "your api key"
-- end,
------------------ end deepseek -----------------
-------------------------------------------------
--- siliconflow
-------------------------------------------------
-- url = "https://api.siliconflow.cn/v1/completions",
-- model = "Qwen/Qwen2.5-Coder-7B-Instruct",
-- api_type = "openai",
-- fetch_key = function()
-- return "your api key"
-- end,
------------------ end siliconflow -----------------
-------------------------------------------------
--- codeium
--- dependency: "Exafunction/codeium.nvim"
-------------------------------------------------
-- api_type = "codeium",
------------------ end codeium ------------------
n_completions = 3,
context_window = 512,
max_tokens = 256,
-- A mapping of filetype to true or false, to enable completion.
filetypes = { sh = false },
-- Whether to enable completion of not for filetypes not specifically listed above.
default_filetype_enabled = true,
auto_trigger = true,
-- just trigger by { "@", ".", "(", "[", ":", " " } for `style = "nvim-cmp"`
only_trigger_by_keywords = true,
style = "virtual_text", -- nvim-cmp or blink.cmp
timeout = 10, -- max request time
-- only send the request every x milliseconds, use 0 to disable throttle.
throttle = 1000,
-- debounce the request in x milliseconds, set to 0 to disable debounce
debounce = 400,
--------------------------------
--- just for virtual_text
--------------------------------
keymap = {
virtual_text = {
accept = {
mode = "i",
keys = "<A-a>",
},
next = {
mode = "i",
keys = "<A-n>",
},
prev = {
mode = "i",
keys = "<A-p>",
},
toggle = {
mode = "n",
keys = "<leader>cp",
},
},
},
},
},