Skip to content

Commit

Permalink
feat(minuet): add
Browse files Browse the repository at this point in the history
  • Loading branch information
xav-ie committed Jan 21, 2025
1 parent 8695750 commit ad233c2
Show file tree
Hide file tree
Showing 4 changed files with 117 additions and 3 deletions.
4 changes: 3 additions & 1 deletion config/plugins/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
./lualine.nix
./luasnip.nix
./markdown-table-sorter.nix
./minuet-ai-nvim.nix
./noice.nix
./notify.nix
./nvim-colorizer.nix
Expand All @@ -36,7 +37,8 @@
./vim-matchup.nix
./which-key
./witt-neovim.nix
] ++ (if helpers.enableExceptInTests then [ ./supermaven.nix ] else [ ]);
];
# ] ++ (if helpers.enableExceptInTests then [ ./supermaven.nix ] else [ ]);

config = {
plugins = {
Expand Down
65 changes: 65 additions & 0 deletions config/plugins/minuet-ai-nvim.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{ pkgs, inputs, ... }:
let
minuet-ai-nvim = pkgs.vimUtils.buildVimPlugin {
name = "minuet-ai.nvim";
src = inputs.minuet-ai-nvim;
dependencies = with pkgs.vimPlugins; [
# TODO: add dependencies if you use the cmp
# or blink extensions only
# nvim-cmp
nvim-treesitter
plenary-nvim
];
nvimRequireCheck = [
"minuet"
"minuet.backends.common"
"minuet.blink"
# TODO: configure cmp?
# "minuet.cmp"
"minuet.config"
"minuet.utils"
"minuet.virtualtext"
];
};
in
{
# TODO: add specific dep on nix binary

# AI Code Completion
# https://github.com/milanglacier/minuet-ai.nvim
config = {
extraConfigLua = # lua
''
require'minuet'.setup {
virtualtext = {
auto_trigger_ft = { '*' },
keymap = {
accept = '<Tab>',
accept_line = '<A-a>',
-- TODO: better bindings
prev = '<C-Left>',
next = '<C-Right>',
dismiss = '<A-e>',
},
},
provider = 'openai_fim_compatible',
provider_options = {
openai_fim_compatible = {
model = 'deepseek-chat',
end_point = 'https://api.deepseek.com/beta/completions',
api_key = 'DEEPSEEK_API_KEY',
name = 'Deepseek',
stream = true,
optional = {
-- top_p = 0.9,
stop = nil,
max_tokens = nil,
},
}
},
}
'';

extraPlugins = [ minuet-ai-nvim ];
};
}
49 changes: 47 additions & 2 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
coq-lsp.url = "github:tomtomjhj/coq-lsp.nvim";
coqtail.flake = false;
coqtail.url = "github:whonore/Coqtail";
minuet-ai-nvim.flake = false;
minuet-ai-nvim.url = "github:milanglacier/minuet-ai.nvim";
oatmeal.flake = false;
oatmeal.url = "github:dustinblackman/oatmeal.nvim";
octo-nvim.flake = false;
Expand Down

0 comments on commit ad233c2

Please sign in to comment.