-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcopilot.lua
More file actions
62 lines (61 loc) · 1.46 KB
/
Copy pathcopilot.lua
File metadata and controls
62 lines (61 loc) · 1.46 KB
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
return {
"zbirenbaum/copilot.lua",
cmd = "Copilot",
build = ":Copilot auth",
keys = {
{ mode = { "n" }, "<leader>ce", ":Copilot enable<CR>", { silent = true } },
{ mode = { "n" }, "<leader>cd", ":Copilot disable<CR>", { silent = true } },
{ mode = { "n" }, "<leader>cp", ":Copilot panel<CR>", { silent = true } },
},
opts = {
panel = {
enabled = true,
auto_refresh = false,
keymap = {
jump_next = "]]",
jump_prev = "[[",
accept = "<CR>",
refresh = "gr",
open = "<M-CR>",
},
layout = {
position = "right",
ratio = 0.4,
},
},
suggestion = {
enabled = true,
auto_trigger = true,
debounce = 75,
keymap = {
accept = "<C-y><C-y>",
accept_word = "<C-y><C-w>",
accept_line = "<C-y><C-l>",
next = "<M-]>",
prev = "<M-[>",
dismiss = "<C-]>",
},
},
filetypes = {
yaml = true,
markdown = true,
gitcommit = true,
sh = function()
if string.match(vim.fs.basename(vim.api.nvim_buf_get_name(0)), "^%.env.*") then
-- disable for .env files
return false
end
return true
end,
},
copilot_node_command = "node",
server_opts_overrides = {
settings = {
advanced = {
inlineSuggestCount = 10,
},
},
},
},
enabled = require("config.util").is_enabled("zbirenbaum/copilot.lua"),
}