Default to claude 3.7 sonnet, use  instead of 🤖
dblume

dblume commited on 2025-04-29 09:23:02
Showing 1 changed files, with 7 additions and 3 deletions.


From https://github.com/deathbeam/dotfiles/blob/master/nvim/.config/nvim/lua/config/copilot.lua
I don't know where deathbeam got that robot, but I like it.
... ...
@@ -485,15 +485,19 @@ lua << EOF
485 485
 
486 486
   for _, str in ipairs(vim.api.nvim_list_runtime_paths()) do
487 487
     if str:find("copilotchat") then
488
+      local chat = require('CopilotChat')
488 489
       -- https://github.com/CopilotC-Nvim/CopilotChat.nvim
489
-      require("CopilotChat").setup({
490
-        question_header = "# 👤 ",
491
-        answer_header = "# 🤖 ",
490
+      chat.setup({
491
+        model = 'claude-3.7-sonnet',
492
+        question_header = '  ',
493
+        answer_header = '   ',
494
+        error_header = '  '
492 495
       })
493 496
 
494 497
       -- Both Copilot and CopilotChat are installed and both remap "<Tab>". Make <S-Tab> work for CopilotChat.
495 498
       -- https://github.com/CopilotC-Nvim/CopilotChat.nvim/issues/1062
496 499
       vim.keymap.set('i', '<S-Tab>', 'copilot#Accept("\\<S-Tab>")', { expr = true, replace_keycodes = false })
500
+      vim.keymap.set({ 'n' }, '<leader>aa', chat.toggle, { desc = 'AI Toggle' })
497 501
       break
498 502
     end
499 503
   end
500 504