From 1776ff3828a93f933fb79621917ebba714dc9abc Mon Sep 17 00:00:00 2001 From: jasmine Date: Wed, 11 Jun 2025 17:53:53 +0800 Subject: [PATCH] feat(copilot-chat): enhance settings and keymaps Add detailed Copilot Chat settings including model selection, context source, selection register, and highlight options. Expand keymaps to support both normal and visual modes for toggling chat and prompts. Improves usability and customization of Copilot Chat in Neovim. --- config/plugins/utils/copilot-chat.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/config/plugins/utils/copilot-chat.nix b/config/plugins/utils/copilot-chat.nix index e02b482..837c138 100644 --- a/config/plugins/utils/copilot-chat.nix +++ b/config/plugins/utils/copilot-chat.nix @@ -6,6 +6,12 @@ settings = { # Model to use for Copilot Chat. model = "gpt-4.1"; + # Use all buffers for context. + context = "buffers"; + # Use yanked text for selection. + selection = "unnamed"; + # Don't highlight the selection. + highlight_selection = false; # Window settings for Copilot Chat. window = { # Width of the chat window. @@ -17,7 +23,7 @@ # Keymaps for Copilot Chat. keymaps = [ { - mode = ["n"]; + mode = ["n" "v"]; key = "ct"; action = "CopilotChatToggle"; options = { @@ -27,7 +33,7 @@ } { - mode = ["n"]; + mode = ["n" "v"]; key = "cp"; action = "CopilotChatPrompts"; options = {