Add nvim-lazy submodule and add plugin configuration.
This commit is contained in:
parent
f545e30831
commit
b1ad0b623a
39 changed files with 1599 additions and 0 deletions
77
pkgsets/nvim/model.nix
Normal file
77
pkgsets/nvim/model.nix
Normal file
|
@ -0,0 +1,77 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
lib.mkIf (lib.elem "nvim::model" config.machine.pkgs) {
|
||||
programs.nvim-lazy.lazyPlugins = [
|
||||
{
|
||||
short = "gsuuon/model.nvim";
|
||||
cmd = [
|
||||
"M"
|
||||
"Model"
|
||||
"Mchat"
|
||||
];
|
||||
init = ''
|
||||
function()
|
||||
vim.filetype.add({
|
||||
extension = {
|
||||
mchat = 'mchat',
|
||||
}
|
||||
})
|
||||
end
|
||||
'';
|
||||
ft = [ "mchat" ];
|
||||
|
||||
keys = [
|
||||
{
|
||||
bind = "<C-m>d";
|
||||
cmd = ":Mdelete<cr>";
|
||||
opts = {
|
||||
mode = "n";
|
||||
};
|
||||
}
|
||||
{
|
||||
bind = "<C-m>s";
|
||||
cmd = ":Mselect<cr>";
|
||||
opts = {
|
||||
mode = "n";
|
||||
};
|
||||
}
|
||||
{
|
||||
bind = "<C-m><space>";
|
||||
cmd = ":Mchat<cr>";
|
||||
opts = {
|
||||
mode = "n";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
config = ''
|
||||
function()
|
||||
require('model.providers.llamacpp').setup({
|
||||
binary = '/home/derped/.nix-profile/bin/llama-server',
|
||||
models = '/home/derped/llama/models'
|
||||
})
|
||||
|
||||
require('model').setup({
|
||||
prompts = {
|
||||
tower = {
|
||||
provider = llamacpp,
|
||||
options = {
|
||||
model = 's',
|
||||
args = {
|
||||
'--keep', -1,
|
||||
'-c', 8192,
|
||||
'-ngl', 35
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
end
|
||||
'';
|
||||
}
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue