diff --git a/config/plugins/utils/codecompanion.nix b/config/plugins/utils/codecompanion.nix index ccb4004..4c90dfe 100644 --- a/config/plugins/utils/codecompanion.nix +++ b/config/plugins/utils/codecompanion.nix @@ -2,7 +2,9 @@ plugins.codecompanion = { enable = true; + # Settings configuration settings = { + # Adapter settings for ollama adapters = { ollama = { __raw = '' @@ -12,49 +14,64 @@ url = "http://127.0.0.1:11434", }, schema = { - model = { - default = 'deepseek-coder-v2:latest', - }, - num_ctx = { - default = 4096, - }, - num_predict = { - default = -1, - }, + model = { default = 'deepseek-coder-v2:latest' }, + num_ctx = { default = 4096, }, + num_predict = { default = -1, }, }, }) end ''; }; }; + + # General options for CodeCompanion opts = { log_level = "TRACE"; send_code = true; use_default_actions = true; use_default_prompts = true; }; + + # Display options + display = { + action_palette = { + prompt = "Prompt "; + provider = "telescope"; + opts = { + show_default_actions = true; + show_default_prompt_library = true; + }; + }; + }; + + # strategies configuration strategies = { - agent = { - adapter = "ollama"; - }; - chat = { - adapter = "ollama"; - }; - inline = { - adapter = "ollama"; - }; + agent = {adapter = "ollama";}; + chat = {adapter = "ollama";}; + inline = {adapter = "ollama";}; }; }; }; + # Keymaps for CodeCompanion keymaps = [ { mode = ["n" "v"]; key = "tc"; - action = "CodeCompanionChat Toggle"; + action = "CodeCompanionChat"; options = { silent = true; - desc = "Toggle CodeCompanion"; + desc = "Toggle CodeCompanion Chat"; + }; + } + + { + mode = ["n" "v"]; + key = "ta"; + action = "CodeCompanionActions"; + options = { + silent = true; + desc = "Toggle CodeCompanion Actions"; }; } ];