diff --git a/lazy-lock.json b/lazy-lock.json index 1940ca51..b9ee0c7d 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -2,13 +2,12 @@ "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, "LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" }, "avante.nvim": { "branch": "main", "commit": "eb1cd44731783024621beafe4e46204cbc9a4320" }, - "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, "cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" }, "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" }, "cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" }, "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, "conform.nvim": { "branch": "master", "commit": "6632e7d788a85bf8405ea0c812d343fc308b7b8c" }, - "copilot.vim": { "branch": "release", "commit": "8d1e0f86d8aaa64070c080589bc2a516beb4024f" }, + "copilot.lua": { "branch": "master", "commit": "b3988bb51e87a057fee79192c3cc0932a0360bf6" }, "crates.nvim": { "branch": "main", "commit": "73d2c590c74a0c582144987a4decb4a642755859" }, "fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" }, "gitsigns.nvim": { "branch": "main", "commit": "02eafb1273afec94447f66d1a43fc5e477c2ab8a" }, @@ -47,7 +46,6 @@ "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, "toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" }, "tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" }, - "vim-maximizer": { "branch": "master", "commit": "2e54952fe91e140a2e69f35f22131219fcd9c5f1" }, "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }, "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } } diff --git a/lua/custom/plugins/avante.lua b/lua/custom/plugins/avante.lua index 841c07c1..d6b9aa11 100644 --- a/lua/custom/plugins/avante.lua +++ b/lua/custom/plugins/avante.lua @@ -4,16 +4,11 @@ return { event = 'VeryLazy', version = false, opts = { - provider = 'openai', - auto_suggestions_provider = 'openai', - openai = { - endpoint = 'https://api.openai.com/v1', - model = 'gpt-4o', - timeout = 30000, -- timeout in milliseconds - temperature = 0, -- adjust if needed + provider = 'copilot', + cursor_applying_provider = 'copilot', + copilot = { + temperature = 0, max_tokens = 8192, - --do something for me - -- reasoning_effort = "high" -- only supported for reasoning models (o1, etc.) }, }, -- if you want to build from source then do `make BUILD_FROM_SOURCE=true` diff --git a/lua/custom/plugins/copilot.lua b/lua/custom/plugins/copilot.lua index c7a9c6ba..ce06c78a 100644 --- a/lua/custom/plugins/copilot.lua +++ b/lua/custom/plugins/copilot.lua @@ -1,20 +1,35 @@ return { { - 'github/copilot.vim', + 'zbirenbaum/copilot.lua', + cmd = 'Copilot', + event = 'InsertEnter', config = function() - vim.g.copilot_enabled = true + require('copilot').setup { + suggestion = { + enabled = true, + auto_trigger = true, + debounce = 75, + keymap = { + accept = '', + next = '', + prev = '', + dismiss = '', + }, + }, + filetypes = { + yaml = true, + markdown = true, + help = false, + gitcommit = false, + gitrebase = false, + hgcommit = false, + svn = false, + cvs = false, + ['.'] = false, + }, + } - vim.api.nvim_create_user_command('CopilotToggle', function() - if vim.g.copilot_enabled == 1 then - vim.g.copilot_enabled = 0 - print 'Copilot: OFF' - else - vim.g.copilot_enabled = 1 - print 'Copilot: ON' - end - end, {}) - - vim.keymap.set('n', 'tc', ':CopilotToggle', { desc = '[T]oggle [C]opilot', silent = true }) + vim.keymap.set('n', 'tc', ':Copilot toggle', { desc = '[T]oggle [C]opilot', silent = true }) end, }, }