diff --git a/config/completion/avante.nix b/config/completion/avante.nix new file mode 100644 index 0000000..90eb1a6 --- /dev/null +++ b/config/completion/avante.nix @@ -0,0 +1,24 @@ +{ + plugins.avante = { + enable = true; + settings = { + auto_suggestions_provider = "copilot"; + selector = { + provider = "snacks"; + }; + input = { + provider = "snacks"; + }; + provider = "copilot"; + # copilot = { + # model = "claude-3.7-sonnet"; + # endpoint = "https://api.githubcopilot.com"; + # allow_insecure = false; + # timeout = 10 * 60 * 1000; + # temperature = 0; + # max_completion_tokens = 1000000; + # reasoning_effort = "high"; + # }; + }; + }; +} diff --git a/config/completion/blink-cmp.nix b/config/completion/blink-cmp.nix index bf0c1cd..a314675 100644 --- a/config/completion/blink-cmp.nix +++ b/config/completion/blink-cmp.nix @@ -7,8 +7,38 @@ in blink-cmp = { enable = true; settings = { - sources.per_filetype.codecompanion = [ "codecompanion" ]; - + sources = { + default = [ + "lsp" + "path" + "snippets" + "buffer" + "avante_commands" + "avante_files" + "avante_mentions" + ]; + providers = { + avante_commands = { + name = "avante_commands"; + module = "blink.compat.source"; + score_offset = 90; + opts = { }; + }; + avante_files = { + name = "avante_files"; + module = "blink.compat.source"; + score_offset = 100; + opts = { }; + }; + avante_mentions = { + name = "avante_mentions"; + module = "blink.compat.source"; + score_offset = 1000; + opts = { }; + }; + }; + per_filetype.codecompanion = [ "codecompanion" ]; + }; completion = { documentation = { auto_show = true; @@ -46,6 +76,8 @@ in }; }; + blink-compat.enable = true; + colorful-menu.enable = true; }; } diff --git a/config/completion/copilot.nix b/config/completion/copilot.nix index f442434..470e7ba 100644 --- a/config/completion/copilot.nix +++ b/config/completion/copilot.nix @@ -10,6 +10,6 @@ }; plugins.copilot-cmp = { - enable = config.plugins.cmp.enable; + inherit (config.plugins.cmp) enable; }; } diff --git a/config/default.nix b/config/default.nix index 2e0f604..31b65a7 100644 --- a/config/default.nix +++ b/config/default.nix @@ -13,12 +13,13 @@ in ./keys.nix ./autocommands.nix + ./completion/avante.nix ./completion/blink-cmp.nix - ./completion/friendly-snippets.nix ./completion/cmp.nix ./completion/codecompanion.nix ./completion/copilot.nix ./completion/friendly-snippets.nix + ./completion/friendly-snippets.nix ./completion/lspkind.nix ./completion/luasnip.nix