Change copilot to lua version; Change zsh completion shortcut

This commit is contained in:
Andreas Tsouchlos 2025-01-14 03:00:32 +01:00
parent 1ad8d13b23
commit e63a60efca
3 changed files with 19 additions and 21 deletions

View File

@ -1,20 +0,0 @@
return {
{
"github/copilot.vim",
event = {
"BufReadPost",
"BufNewFile"
},
cmd = {
"Copilot"
},
init = function()
vim.g.copilot_no_tab_map = true
vim.g.copilot_assume_mapped = true
vim.api.nvim_set_keymap("i", "<C-y>", 'copilot#Accept("<CR>")', {
silent = true,
expr = true
})
end
}
}

View File

@ -0,0 +1,18 @@
return {
"zbirenbaum/copilot.lua",
cmd = "Copilot",
event = "InsertEnter",
opts = {
suggestion = {
auto_trigger = true,
keymap = {
accept = "<C-l>",
-- accept_word = false,
-- accept_line = false,
-- next = "<M-]>",
-- prev = "<M-[>",
-- dismiss = "<C-]>"
}
}
}
}

View File

@ -53,4 +53,4 @@ eval "$(thefuck --alias)"
. "/usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh"
bindkey '^y' autosuggest-accept
bindkey '^l' autosuggest-accept