52 lines
1.4 KiB
Lua
52 lines
1.4 KiB
Lua
return {
|
|
dependencies = { "nvim-lua/plenary.nvim" },
|
|
"milanglacier/minuet-ai.nvim",
|
|
config = function()
|
|
require("minuet").setup({
|
|
provider = "openai_fim_compatible",
|
|
n_completions = 1, -- recommend for local model for resource saving
|
|
context_window = 512,
|
|
provider_options = {
|
|
openai_fim_compatible = {
|
|
-- For Windows users, TERM may not be present in environment variables.
|
|
-- Consider using APPDATA instead.
|
|
api_key = "TERM",
|
|
name = "LLama.cpp",
|
|
end_point = "http://localhost:8012/v1/completions",
|
|
model = "PLACEHOLDER",
|
|
optional = {
|
|
max_tokens = 56,
|
|
top_p = 0.9,
|
|
},
|
|
template = {
|
|
prompt = function(context_before_cursor, context_after_cursor, _)
|
|
return "<|fim_prefix|>"
|
|
.. context_before_cursor
|
|
.. "<|fim_suffix|>"
|
|
.. context_after_cursor
|
|
.. "<|fim_middle|>"
|
|
end,
|
|
suffix = false,
|
|
},
|
|
},
|
|
},
|
|
virtualtext = {
|
|
auto_trigger_ft = {},
|
|
keymap = {
|
|
-- accept whole completion
|
|
accept = "<M-T>",
|
|
-- accept one line
|
|
accept_line = "<M-t>",
|
|
-- accept n lines (prompts for number)
|
|
-- e.g. "A-z 2 CR" will accept 2 lines
|
|
accept_n_lines = "<M-z>",
|
|
-- Cycle to prev completion item, or manually invoke completion
|
|
prev = "<M-h>",
|
|
-- Cycle to next completion item, or manually invoke completion
|
|
next = "<M-l>",
|
|
dismiss = "<M-e>",
|
|
},
|
|
},
|
|
})
|
|
end,
|
|
}
|