diff --git a/flake.lock b/flake.lock index 431a1e7..1e57802 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1731425077, - "narHash": "sha256-cpbqzVTq814fH5QK9Ry0iGEb8u//l0OCT90cQJOKHyU=", + "lastModified": 1731646286, + "narHash": "sha256-bxNRatk+Wc0iEiZ4tMGgiVA1e6BEps+o9Ehhk8WK6a4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "e6fa8c6399e996409853ae5e38b5fce1c44a06cd", + "rev": "c598fc0ca3ee36cf337042af6b4d4b141e333d99", "type": "github" }, "original": { @@ -18,11 +18,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1731239293, - "narHash": "sha256-q2yjIWFFcTzp5REWQUOU9L6kHdCDmFDpqeix86SOvDc=", + "lastModified": 1731386116, + "narHash": "sha256-lKA770aUmjPHdTaJWnP3yQ9OI1TigenUqVC3wweqZuI=", "owner": "nixos", "repo": "nixpkgs", - "rev": "9256f7c71a195ebe7a218043d9f93390d49e6884", + "rev": "689fed12a013f56d4c4d3f612489634267d86529", "type": "github" }, "original": { @@ -51,11 +51,11 @@ "nvim_plugin-CopilotC-Nvim/CopilotChat.nvim": { "flake": false, "locked": { - "lastModified": 1730902338, - "narHash": "sha256-kM9PtMEKyMkJjSsnwSELx52Dx6Va1id92Svv7w6nVtc=", + "lastModified": 1731628904, + "narHash": "sha256-hPe8IIldkK1bWoAdFeU0orDYqML8oEI6v6pwJ9W2zd0=", "owner": "CopilotC-Nvim", "repo": "CopilotChat.nvim", - "rev": "18d51754e9dc87d6b85f1e331c1fca0825384517", + "rev": "85a1679837d2698273e98295a6ff4ba66477ea1c", "type": "github" }, "original": { @@ -99,11 +99,11 @@ "nvim_plugin-MeanderingProgrammer/render-markdown.nvim": { "flake": false, "locked": { - "lastModified": 1731358022, - "narHash": "sha256-Li0w+AHSGW/sRJDFGbXipKpWyG2EK1bummTDHMPkiCY=", + "lastModified": 1731526233, + "narHash": "sha256-8xt2bjdNqMU3Um1mFDpUPEzQtUzwgBYv6nRw2tkKL8k=", "owner": "MeanderingProgrammer", "repo": "render-markdown.nvim", - "rev": "78a2eb7fc273f36790aa390262f390a3265eedff", + "rev": "82184c4a3c3580a7a859b2cb7e58f16c10fd29ef", "type": "github" }, "original": { @@ -179,11 +179,11 @@ "nvim_plugin-b0o/schemastore.nvim": { "flake": false, "locked": { - "lastModified": 1731351639, - "narHash": "sha256-6jVbzYitS+gHIyuzfuQ2Q9Sujo+8m+PUKFuyfa/xcdI=", + "lastModified": 1731614445, + "narHash": "sha256-pz/NEPGdt7ER4ZW6z/329XSa4a2B9z4+PZ75DXzXxNE=", "owner": "b0o", "repo": "schemastore.nvim", - "rev": "64aed5788796d1f241da0afbd096e6dd649694bd", + "rev": "8ae7ed5b8a58ad36136d9b440205cef552bd0e41", "type": "github" }, "original": { @@ -387,11 +387,11 @@ "nvim_plugin-lewis6991/gitsigns.nvim": { "flake": false, "locked": { - "lastModified": 1730713501, - "narHash": "sha256-FHzufzeVrPnbU5j3UabVTCYXP+QNcb7gMgef0BmuclA=", + "lastModified": 1731605154, + "narHash": "sha256-8vWilpsVw22+nAEAjhGOvZniRRj5r1UITcW9YeuDH8o=", "owner": "lewis6991", "repo": "gitsigns.nvim", - "rev": "4daf7022f1481edf1e8fb9947df13bb07c18e89a", + "rev": "ac5aba6dce8c06ea22bea2c9016f51a2dbf90dc7", "type": "github" }, "original": { @@ -803,11 +803,11 @@ "nvim_plugin-stevearc/conform.nvim": { "flake": false, "locked": { - "lastModified": 1731295166, - "narHash": "sha256-i36OS+hs8wd3SZgToLh+vkn1gNt3pvzGgCHalASsywA=", + "lastModified": 1731515724, + "narHash": "sha256-RecTSlSd1ijhp5JQQUiaLZwYKUEV/EuGcd6gc1TjwNc=", "owner": "stevearc", "repo": "conform.nvim", - "rev": "8c354323201d04530727d8bdcc4669791ee082ef", + "rev": "023f795dbcf32d4351b6a9ed2e613d471b5bb812", "type": "github" }, "original": { @@ -1015,11 +1015,11 @@ ] }, "locked": { - "lastModified": 1731378398, - "narHash": "sha256-a0QWaiX8+AJ9/XBLGMDy6c90GD7HzpxKVdlFwCke5Pw=", + "lastModified": 1731637922, + "narHash": "sha256-6iuzRINXyPX4DfUQZIGafpJnzjFXjVRYMymB10/jFFY=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "0ae9fc2f2fe5361837d59c0bdebbda176427111e", + "rev": "db10c66da18e816030b884388545add8cf096647", "type": "github" }, "original": { diff --git a/lua/plugins/avante.lua b/lua/plugins/avante.lua index c19106a..4ebe3da 100644 --- a/lua/plugins/avante.lua +++ b/lua/plugins/avante.lua @@ -1,30 +1,35 @@ return { - -- cond = false, "yetone/avante.nvim", - dependencies = { - "nvim-treesitter/nvim-treesitter", - "stevearc/dressing.nvim", - "nvim-lua/plenary.nvim", - "MunifTanjim/nui.nvim", - --- The below dependencies are optional, - -- { - -- -- support for image pasting - -- "HakonHarnes/img-clip.nvim", - -- event = "VeryLazy", - -- opts = { - -- -- recommended settings - -- default = { - -- embed_image_as_base64 = false, - -- prompt_for_file_name = false, - -- drag_and_drop = { - -- insert_mode = true, - -- }, - -- -- required for Windows users - -- use_absolute_path = true, - -- }, - -- }, - -- }, - }, + dependencies = (function() + local deps = { + "nvim-treesitter/nvim-treesitter", + "stevearc/dressing.nvim", + "nvim-lua/plenary.nvim", + "MunifTanjim/nui.nvim", + -- { + -- -- support for image pasting + -- "HakonHarnes/img-clip.nvim", + -- event = "VeryLazy", + -- opts = { + -- -- recommended settings + -- default = { + -- embed_image_as_base64 = false, + -- prompt_for_file_name = false, + -- drag_and_drop = + -- insert_mode = true, + -- }, + -- -- required for Windows users + -- use_absolute_path = true, + -- }, + -- }, + -- }, + } + -- Only add copilot if ANTHROPIC_API_KEY is not set + if os.getenv("ANTHROPIC_API_KEY") == nil then + table.insert(deps, "zbirenbaum/copilot.lua") + end + return deps + end)(), event = "VeryLazy", build = function() -- TODO does this actually work? I still dont have full non nix support tested for this config. @@ -43,10 +48,32 @@ return { return { provider = provider, + auto_suggestions_provider = provider, + hints = { enabled = false }, behavior = { - -- auto_suggestions = true, -- Experimental stage + auto_suggestions = true, -- Experimental stage auto_set_keymaps = false, support_paste_from_clipboard = true, + auto_apply_diff_after_generation = false, + }, + windows = { + position = "top", + input = { + prefix = "", + }, + }, + mappings = { + ask = "", + edit = "", + refresh = "r", + focus = "f", + toggle = { + default = "c", + debug = "", + hint = "", + suggestion = "S", + repomap = "R", + }, }, } end, @@ -61,18 +88,6 @@ return { desc = "Avante - Toggle Chat", mode = { "n", "v", "x" }, }, - { - "r", - "AvanteRefresh", - desc = "Avante - Refresh", - mode = { "n", "v", "x" }, - }, - { - "f", - "AvanteFocus", - desc = "CopilotChat - Quick chat", - mode = { "n", "v", "x" }, - }, { "e", "AvanteEdit",