feat(nvim): add gen.nvim and ollama service
This commit is contained in:
parent
ddc2989620
commit
82ffbcbde4
6 changed files with 74 additions and 1 deletions
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{ pkgs, lib, ... }:
|
||||
|
||||
with builtins;
|
||||
{
|
||||
|
|
@ -332,5 +332,25 @@ with builtins;
|
|||
};
|
||||
cmd = [ "Neogen" ];
|
||||
}
|
||||
{
|
||||
plugin = gen-nvim;
|
||||
init = /* lua */ ''
|
||||
require("gen").setup({
|
||||
model = "zephyr:7b-beta", -- The default model to use.
|
||||
display_mode = "float", -- The display mode. Can be "float" or "split".
|
||||
show_prompt = false, -- Shows the Prompt submitted to Ollama.
|
||||
show_model = false, -- Displays which model you are using at the beginning of your chat session.
|
||||
no_auto_close = false, -- Never closes the window automatically.
|
||||
init = function(options) end,
|
||||
-- Function to initialize Ollama
|
||||
command = "${lib.getExe pkgs.curl} --silent --no-buffer -X POST http://localhost:11434/api/generate -d $body",
|
||||
-- The command for the Ollama service. You can use placeholders $prompt, $model and $body (shellescaped).
|
||||
-- This can also be a lua function returning a command string, with options as the input parameter.
|
||||
-- The executed command must return a JSON object with { response, context }
|
||||
-- (context property is optional).
|
||||
debug = false -- Prints errors and the command which is run.
|
||||
})
|
||||
'';
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue