Browse Source

feat: add copilot back

master
Tovi Jaeschke-Rogers 7 months ago
parent
commit
0b40ec4d23
2 changed files with 43 additions and 0 deletions
  1. +41
    -0
      .config/nvim/lua/tovi/plugins/copilot.lua
  2. +2
    -0
      .config/nvim/lua/tovi/plugins/telescope.lua

+ 41
- 0
.config/nvim/lua/tovi/plugins/copilot.lua View File

@ -0,0 +1,41 @@
return {
'zbirenbaum/copilot.lua',
cmd = "Copilot",
event = "InsertEnter",
config = function()
require("copilot").setup({
panel = {
enabled = true,
auto_refresh = false,
keymap = {
jump_prev = "[[",
jump_next = "]]",
accept = "<CR>",
refresh = "gr",
open = "<M-CR>"
},
layout = {
position = "bottom", -- | top | left | right
ratio = 0.4
},
},
suggestion = {
enabled = true,
auto_trigger = true,
debounce = 75,
keymap = {
accept = ",,",
accept_word = false,
accept_line = false,
next = "<C-n>",
prev = "<C-p>",
dismiss = "<C-]>",
},
},
filetypes = {
},
copilot_node_command = 'node', -- Node.js version must be > 18.x
server_opts_overrides = {},
})
end,
}

+ 2
- 0
.config/nvim/lua/tovi/plugins/telescope.lua View File

@ -119,6 +119,8 @@ return {
keymap.set("n", "<C-g>", function () builtin.live_grep({ hidden = true }) end, {}) keymap.set("n", "<C-g>", function () builtin.live_grep({ hidden = true }) end, {})
keymap.set("n", "<C-p>", find_files, {}) keymap.set("n", "<C-p>", find_files, {})
keymap.set("n", "<leader>fr", builtin.resume, {})
keymap.set("n", "<leader>fb", builtin.buffers, {}) keymap.set("n", "<leader>fb", builtin.buffers, {})
keymap.set("n", "<leader>fo", builtin.oldfiles, {}) keymap.set("n", "<leader>fo", builtin.oldfiles, {})


Loading…
Cancel
Save