diff --git a/.config/nvim/lua/plugins/codecompanion.lua b/.config/nvim/lua/plugins/codecompanion.lua index 3c555ca..a040394 100644 --- a/.config/nvim/lua/plugins/codecompanion.lua +++ b/.config/nvim/lua/plugins/codecompanion.lua @@ -131,7 +131,7 @@ return { }, -- }}} }, - strategies = { + interactions = { chat = { adapter = "copilot", -- adapter = "openrouter", @@ -182,11 +182,21 @@ return { end, completion_provider = "cmp", }, + fold_reasoning = true, + show_reasoning = true, }, inline = { adapter = "copilot", -- adapter = "openrouter", }, + cmd = { + adapter = "copilot", + }, + background = { + adapter = { + name = "copilot", + }, + }, }, display = { action_palette = { @@ -232,7 +242,6 @@ return { -- Options for inline diff provider inline = { layout = "buffer", -- float|buffer - Where to display the diff - diff_signs = { signs = { text = "▌", -- Sign text for normal changes @@ -307,6 +316,31 @@ return { }, }, }, + rules = { + default = { + description = "Collection of common files for all projects", + files = { + ".clinerules", + ".cursorrules", + ".goosehints", + ".rules", + ".windsurfrules", + ".github/copilot-instructions.md", + "AGENT.md", + "AGENTS.md", + { path = "CLAUDE.md", parser = "claude" }, + { path = "CLAUDE.local.md", parser = "claude" }, + { path = "~/.claude/CLAUDE.md", parser = "claude" }, + }, + is_preset = true, + }, + opts = { + chat = { + enabled = true, + default_rules = "default", -- The rule groups to load + }, + }, + }, }, init = function() require("utils.codecompanion.fidget-spinner"):init() diff --git a/.config/nvim/lua/utils/codecompanion/fidget-spinner-notify.lua b/.config/nvim/lua/utils/codecompanion/fidget-spinner-notify.lua index d6aaa50..8cfbb29 100644 --- a/.config/nvim/lua/utils/codecompanion/fidget-spinner-notify.lua +++ b/.config/nvim/lua/utils/codecompanion/fidget-spinner-notify.lua @@ -50,7 +50,7 @@ end function M:create_progress_handle(request) local title = " Requesting assistance" .. " (" - .. request.data.strategy + .. request.data.interaction .. ") from " .. request.data.adapter.formatted_name .. " using " diff --git a/.config/nvim/lua/utils/codecompanion/fidget-spinner.lua b/.config/nvim/lua/utils/codecompanion/fidget-spinner.lua index 59c3c5f..bc2bb90 100644 --- a/.config/nvim/lua/utils/codecompanion/fidget-spinner.lua +++ b/.config/nvim/lua/utils/codecompanion/fidget-spinner.lua @@ -43,10 +43,10 @@ end function M:create_progress_handle(request) return progress.handle.create({ - title = " Requesting assistance (" .. request.data.strategy .. ")", + title = " Requesting assistance (" .. request.data.adapter.model .. ")", message = "In progress...", lsp_client = { - name = M:llm_role_title(request.data.adapter), + name = M:llm_role_title(request.data.adapter.name), }, }) end