feat: migrate to copilot
This commit is contained in:
parent
5eaf4e95b0
commit
93a133da28
|
@ -9,6 +9,7 @@
|
|||
|
||||
# Completion
|
||||
./plugins/cmp/cmp.nix
|
||||
./plugins/cmp/copilot.nix
|
||||
|
||||
# Snippets
|
||||
./plugins/snippets/luasnip.nix
|
||||
|
@ -33,7 +34,6 @@
|
|||
./plugins/git/lazygit.nix
|
||||
|
||||
# Utils
|
||||
./plugins/utils/codecompanion.nix
|
||||
./plugins/utils/markdown-preview.nix
|
||||
./plugins/utils/telescope.nix
|
||||
./plugins/utils/whichkey.nix
|
||||
|
|
5
config/plugins/cmp/copilot.nix
Normal file
5
config/plugins/cmp/copilot.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{...}: {
|
||||
plugins.copilot-vim = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
|
@ -1,78 +0,0 @@
|
|||
{...}: {
|
||||
plugins.codecompanion = {
|
||||
enable = true;
|
||||
|
||||
# Settings configuration
|
||||
settings = {
|
||||
# Adapter settings for ollama
|
||||
adapters = {
|
||||
ollama = {
|
||||
__raw = ''
|
||||
function()
|
||||
return require('codecompanion.adapters').extend('ollama', {
|
||||
env = {
|
||||
url = "http://127.0.0.1:11434",
|
||||
},
|
||||
schema = {
|
||||
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";};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Keymaps for CodeCompanion
|
||||
keymaps = [
|
||||
{
|
||||
mode = ["n" "v"];
|
||||
key = "<leader>tc";
|
||||
action = "<cmd>CodeCompanionChat<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Toggle CodeCompanion Chat";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = ["n" "v"];
|
||||
key = "<leader>ta";
|
||||
action = "<cmd>CodeCompanionActions<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Toggle CodeCompanion Actions";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
Loading…
Reference in a new issue