[nvim] migrate from copilot to codeium
This commit is contained in:
parent
6beac901d8
commit
bf693f4ae3
4 changed files with 36 additions and 67 deletions
|
@ -3,7 +3,7 @@
|
|||
"LuaSnip": { "branch": "master", "commit": "50fcf17db7c75af80e6b6109acfbfb4504768780" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "99337f63f0a3c3ab9519f3d1da7618ca4f91cffe" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
||||
"copilot.lua": { "branch": "master", "commit": "f7612f5af4a7d7615babf43ab1e67a2d790c13a6" },
|
||||
"codeium.vim": { "branch": "main", "commit": "0b74f274b82c00eaad4b5b5cd8b2e76f872d19f1" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "e3714c8049b2243e792492c4149e4cc395c68eb9" },
|
||||
"flutter-tools.nvim": { "branch": "main", "commit": "990a1349c29f7d474a0cd51355aba773ccc9deea" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "4a143f13e122ab91abdc88f89eefbe70a4858a56" },
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
vim.api.nvim_set_keymap("n", "<leader>;", "<cmd>bprev<cr>", { desc="prev buffer", noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap("n", "<leader>'", "<cmd>bnext<cr>", { desc="next buffer", noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap("n", "<leader>;", "<cmd>bprev<cr>", { desc = "prev buffer", noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap("n", "<leader>'", "<cmd>bnext<cr>", { desc = "next buffer", noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap("x", "<C-p>", '"_dP', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap("n", "<leader>/", "gcc", { noremap = false, silent = true })
|
||||
vim.api.nvim_set_keymap(
|
||||
|
@ -47,7 +47,7 @@ vim.keymap.set("o", "N", "'nN'[v:searchforward]", { expr = true, desc = "Prev se
|
|||
vim.keymap.set("n", "<leader>K", "<cmd>norm! K<cr>", { desc = "Keywordprg" })
|
||||
|
||||
-- lazy
|
||||
vim.keymap.set("n", "<leader>l", "<cmd>Lazy<cr>", { desc = "Lazy" })
|
||||
vim.keymap.set("n", "<leader>p", "<cmd>Lazy<cr>", { desc = "Lazy" })
|
||||
|
||||
-- new file
|
||||
vim.keymap.set("n", "<leader>n", "<cmd>enew<cr>", { desc = "New File" })
|
||||
|
@ -72,8 +72,10 @@ vim.keymap.set("t", "<C-w>", "<cmd>close<cr>", { desc = "Hide Terminal" })
|
|||
|
||||
-- lsp
|
||||
vim.keymap.set("n", "gd", "<cmd>lua vim.lsp.buf.definition()<cr>", { desc = "Goto Definition" })
|
||||
vim.keymap.set("n", "gs", "<cmd>vsplit | lua vim.lsp.buf.definition()<cr>", { desc = "Goto Definition in vertical split" })
|
||||
vim.keymap.set("n", "gS", "<cmd>belowright | lua vim.lsp.buf.definition()<cr>", { desc = "Goto Definition in horizontal split" })
|
||||
vim.keymap.set("n", "gs", "<cmd>vsplit | lua vim.lsp.buf.definition()<cr>",
|
||||
{ desc = "Goto Definition in vertical split" })
|
||||
vim.keymap.set("n", "gS", "<cmd>belowright | lua vim.lsp.buf.definition()<cr>",
|
||||
{ desc = "Goto Definition in horizontal split" })
|
||||
vim.keymap.set("n", "gD", "<cmd>lua vim.lsp.buf.declaration()<cr>", { desc = "Goto Declaration" })
|
||||
vim.keymap.set("n", "gi", "<cmd>lua vim.lsp.buf.implementation()<cr>", { desc = "Goto Implementation" })
|
||||
vim.keymap.set("n", "gr", "<cmd>lua vim.lsp.buf.references()<cr>", { desc = "Goto References" })
|
||||
|
@ -87,8 +89,10 @@ vim.keymap.set("n", "<leader>lr", "<cmd>lua vim.lsp.buf.rename()<CR>", { desc =
|
|||
|
||||
-- trouble
|
||||
vim.keymap.set("n", "<leader>xx", "<cmd>TroubleToggle<cr>", { desc = "Trouble toggle" })
|
||||
vim.keymap.set("n", "<leader>xw", "<cmd>TroubleToggle workspace_diagnostics<cr>", { desc = "Trouble workspace diagnostics" })
|
||||
vim.keymap.set("n", "<leader>xd", "<cmd>TroubleToggle document_diagnostics<cr>", { desc = "Trouble document diagnostics" })
|
||||
vim.keymap.set("n", "<leader>xw", "<cmd>TroubleToggle workspace_diagnostics<cr>",
|
||||
{ desc = "Trouble workspace diagnostics" })
|
||||
vim.keymap.set("n", "<leader>xd", "<cmd>TroubleToggle document_diagnostics<cr>",
|
||||
{ desc = "Trouble document diagnostics" })
|
||||
vim.keymap.set("n", "<leader>xq", "<cmd>TroubleToggle quickfix<cr>", { desc = "Trouble quickfix" })
|
||||
vim.keymap.set("n", "<leader>xl", "<cmd>TroubleToggle loclist<cr>", { desc = "Trouble loclist" })
|
||||
vim.keymap.set("n", "<leader>gR", "<cmd>TroubleToggle lsp_references<cr>", { desc = "Trouble lsp references" })
|
||||
|
@ -102,8 +106,10 @@ vim.keymap.set('n', '<leader>uu', vim.cmd.UndotreeToggle, { desc = "Toggle undo
|
|||
-- harpoon
|
||||
vim.keymap.set("n", "<leader>hh", "<cmd>lua require('harpoon.ui').toggle_quick_menu()<cr>", { desc = "Harpoon Menu" })
|
||||
vim.keymap.set("n", "<leader>ha", "<cmd>lua require('harpoon.mark').add_file()<cr>", { desc = "Harpoon Add File" })
|
||||
vim.keymap.set("n", "<leader>k", "<cmd>lua require('harpoon.ui').nav_next()<cr>", { desc = "Navigate to next harpoon file" })
|
||||
vim.keymap.set("n", "<leader>j", "<cmd>lua require('harpoon.ui').nav_prev()<cr>", { desc = "Navigate to previous harpoon file" })
|
||||
vim.keymap.set("n", "<leader>k", "<cmd>lua require('harpoon.ui').nav_next()<cr>",
|
||||
{ desc = "Navigate to next harpoon file" })
|
||||
vim.keymap.set("n", "<leader>j", "<cmd>lua require('harpoon.ui').nav_prev()<cr>",
|
||||
{ desc = "Navigate to previous harpoon file" })
|
||||
|
||||
-- ditto
|
||||
vim.keymap.set("n", "<leader>dd", "<cmd>ToggleDitto<cr>", { desc = "Ditto toggle" })
|
||||
|
|
|
@ -1,52 +1,15 @@
|
|||
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 = "<C-a>",
|
||||
refresh = "<C-r>",
|
||||
open = "<C-w>",
|
||||
},
|
||||
layout = {
|
||||
position = "bottom", -- | top | left | right
|
||||
ratio = 0.4,
|
||||
},
|
||||
},
|
||||
suggestion = {
|
||||
enabled = true,
|
||||
auto_trigger = true,
|
||||
debounce = 80,
|
||||
keymap = {
|
||||
accept = "<C-a>",
|
||||
accept_word = false,
|
||||
accept_line = false,
|
||||
next = "<C-q>",
|
||||
prev = "<C-e>",
|
||||
dismiss = "<C-d>",
|
||||
},
|
||||
},
|
||||
filetypes = {
|
||||
yaml = false,
|
||||
markdown = false,
|
||||
help = false,
|
||||
gitcommit = false,
|
||||
gitrebase = false,
|
||||
hgcommit = false,
|
||||
svn = false,
|
||||
cvs = false,
|
||||
["."] = false,
|
||||
},
|
||||
copilot_node_command = "node", -- Node.js version must be > 16.x
|
||||
server_opts_overrides = {},
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
'Exafunction/codeium.vim',
|
||||
event = 'BufEnter',
|
||||
config = function()
|
||||
-- Change '<C-g>' here to any keycode you like.
|
||||
vim.keymap.set('i', '<C-a>', function() return vim.fn['codeium#Accept']() end, { expr = true, silent = true })
|
||||
vim.keymap.set('i', '<C-e>', function() return vim.fn['codeium#CycleCompletions'](1) end,
|
||||
{ expr = true, silent = true })
|
||||
vim.keymap.set('i', '<C-q>', function() return vim.fn['codeium#CycleCompletions'](-1) end,
|
||||
{ expr = true, silent = true })
|
||||
vim.keymap.set('i', '<C-d>', function() return vim.fn['codeium#Clear']() end, { expr = true, silent = true })
|
||||
end
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,9 +53,9 @@ return {
|
|||
lualine_x = {
|
||||
{
|
||||
function() return " " .. require("dap").status() end,
|
||||
cond = function () return package.loaded["dap"] and require("dap").status() ~= "" end,
|
||||
cond = function() return package.loaded["dap"] and require("dap").status() ~= "" end,
|
||||
},
|
||||
{ require("lazy.status").updates, cond = require("lazy.status").has_updates},
|
||||
{ require("lazy.status").updates, cond = require("lazy.status").has_updates },
|
||||
{
|
||||
"diff",
|
||||
symbols = {
|
||||
|
@ -66,7 +66,7 @@ return {
|
|||
},
|
||||
},
|
||||
lualine_y = {
|
||||
{ "progress", separator = " ", padding = { left = 1, right = 0 } },
|
||||
{ "progress", separator = " ", padding = { left = 1, right = 0 } },
|
||||
{ "location", padding = { left = 0, right = 1 } },
|
||||
},
|
||||
lualine_z = {
|
||||
|
@ -81,7 +81,7 @@ return {
|
|||
},
|
||||
{
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
lazy=false,
|
||||
lazy = false,
|
||||
},
|
||||
{
|
||||
"echasnovski/mini.indentscope",
|
||||
|
@ -116,7 +116,7 @@ return {
|
|||
"akinsho/bufferline.nvim",
|
||||
event = "VeryLazy",
|
||||
keys = {
|
||||
{ "<leader>bp", "<Cmd>BufferLineTogglePin<CR>", desc = "Toggle pin" },
|
||||
{ "<leader>bp", "<Cmd>BufferLineTogglePin<CR>", desc = "Toggle pin" },
|
||||
{ "<leader>bP", "<Cmd>BufferLineGroupClose ungrouped<CR>", desc = "Delete non-pinned buffers" },
|
||||
},
|
||||
opts = {
|
||||
|
@ -129,7 +129,7 @@ return {
|
|||
always_show_bufferline = false,
|
||||
diagnostics_indicator = function(_, _, diag)
|
||||
local ret = (diag.error and " " .. diag.error or "")
|
||||
.. (diag.warning and " " .. diag.warning or "")
|
||||
.. (diag.warning and " " .. diag.warning or "")
|
||||
return vim.trim(ret)
|
||||
end,
|
||||
offsets = {
|
||||
|
@ -188,7 +188,7 @@ return {
|
|||
dependencies = {
|
||||
"MunifTanjim/nui.nvim",
|
||||
"rcarriga/nvim-notify",
|
||||
}
|
||||
}
|
||||
},
|
||||
-- icons
|
||||
{ "nvim-tree/nvim-web-devicons", lazy = true },
|
||||
|
|
Loading…
Reference in a new issue