feat: extract and configure code-companion
This commit is contained in:
parent
599be55422
commit
52fb50b13c
3 changed files with 30 additions and 13 deletions
26
neovim/codecompanion.lua
Normal file
26
neovim/codecompanion.lua
Normal file
|
@ -0,0 +1,26 @@
|
|||
local codecompanion = require("codecompanion")
|
||||
|
||||
codecompanion.setup({
|
||||
strategies = {
|
||||
chat = {
|
||||
adapter = "copilot",
|
||||
},
|
||||
inline = {
|
||||
adapter = "copilot",
|
||||
},
|
||||
cmd = {
|
||||
adapter = "copilot",
|
||||
},
|
||||
},
|
||||
adapters = {
|
||||
copilot = function()
|
||||
return require("codecompanion.adapters").extend("copilot", {
|
||||
schema = {
|
||||
model = {
|
||||
default = "claude-3.7-sonnet",
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
})
|
|
@ -179,16 +179,7 @@
|
|||
},
|
||||
})
|
||||
|
||||
require('codecompanion').setup({
|
||||
strategies = {
|
||||
chat = {
|
||||
adapter = "copilot",
|
||||
},
|
||||
inline = {
|
||||
adapter = "copilot",
|
||||
},
|
||||
},
|
||||
})
|
||||
require("local_codecompanion")
|
||||
|
||||
require("diffview").setup({
|
||||
view = {
|
||||
|
@ -231,4 +222,5 @@
|
|||
home.file.".config/nvim/lua/local_illuminate.lua".source = ./illuminate.lua;
|
||||
home.file.".config/nvim/lua/local_wilder.lua".source = ./wilder.lua;
|
||||
home.file.".config/nvim/lua/local_firenvim.lua".source = ./firenvim.lua;
|
||||
home.file.".config/nvim/lua/local_codecompanion.lua".source = ./codecompanion.lua;
|
||||
}
|
||||
|
|
|
@ -64,6 +64,5 @@ nnoremap("gq", ":Bdelete<CR>")
|
|||
-- toggle search highlighting
|
||||
vim.cmd('nnoremap <expr> * v:hlsearch ? ":nohlsearch<cr>" : "*"')
|
||||
|
||||
-- open Copilot Chat window
|
||||
nnoremap("<leader>cc", ":lua require('CopilotChat').open()<CR>")
|
||||
nnoremap("<leader>C", ":CodeCompanionChat #buffer<CR>")
|
||||
-- open CodeCompanion chat window
|
||||
nnoremap("<leader>cc", ":CodeCompanionChat #buffer{watch} #lsp @full_stack_dev<CR>")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue