Change copilot to lua version; Change zsh completion shortcut
This commit is contained in:
parent
1ad8d13b23
commit
e63a60efca
@ -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
|
||||
}
|
||||
}
|
||||
18
nvim/.config/nvim/lua/plugins/lua_copilot.lua
Normal file
18
nvim/.config/nvim/lua/plugins/lua_copilot.lua
Normal 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-]>"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -53,4 +53,4 @@ eval "$(thefuck --alias)"
|
||||
|
||||
. "/usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh"
|
||||
|
||||
bindkey '^y' autosuggest-accept
|
||||
bindkey '^l' autosuggest-accept
|
||||
|
||||
Loading…
Reference in New Issue
Block a user