mirror of
https://github.com/akr2002/nv.git
synced 2024-11-09 10:39:44 +00:00
add ollama
This commit is contained in:
parent
2081f33ef8
commit
08f2906f82
2 changed files with 42 additions and 0 deletions
|
@ -36,6 +36,8 @@
|
|||
|
||||
./none-ls/none-ls.nix
|
||||
|
||||
./ollama/ollama.nix
|
||||
|
||||
./sets.nix
|
||||
|
||||
./snippets/luasnip.nix
|
||||
|
|
40
config/ollama/ollama.nix
Normal file
40
config/ollama/ollama.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
plugins.ollama = {
|
||||
enable = true;
|
||||
model = "tinyllama";
|
||||
url = "http://127.0.0.11435";
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
key = "<leader>o";
|
||||
action = "<cmd>Ollama<cr>";
|
||||
options = {
|
||||
desc = "Ask Ollama";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "v";
|
||||
key = "<leader>oe";
|
||||
action = "<cmd>Ollama Explain_Code<cr>";
|
||||
options = {
|
||||
desc = "Explain code snippet";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>oo";
|
||||
action = "<cmd>Ollama Raw<cr>";
|
||||
options = {
|
||||
desc = "Ask Ollama";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "v";
|
||||
key = "<leader>os";
|
||||
action = "<cmd>Ollama Simplify_Code<cr>";
|
||||
options = {
|
||||
desc = "Simplify code snippet";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
Loading…
Reference in a new issue