diff --git a/lua/custom/plugins/llm.lua b/lua/custom/plugins/llm.lua new file mode 100644 index 00000000..916fc66c --- /dev/null +++ b/lua/custom/plugins/llm.lua @@ -0,0 +1,48 @@ +return { + { + 'milanglacier/minuet-ai.nvim', + config = function() + require('minuet').setup { + virtualtext = { + auto_trigger_ft = {}, + keymap = { + -- accept whole completion + accept = '', + -- accept one line + accept_line = '', + -- accept n lines (prompts for number) + -- e.g. "A-z 2 CR" will accept 2 lines + accept_n_lines = '', + -- Cycle to prev completion item, or manually invoke completion + prev = '', + -- Cycle to next completion item, or manually invoke completion + next = '', + dismiss = '', + }, + }, + provider = 'openai_fim_compatible', + n_completions = 1, -- recommend for local model for resource saving + -- I recommend beginning with a small context window size and incrementally + -- expanding it, depending on your local computing power. A context window + -- of 512, serves as an good starting point to estimate your computing + -- power. Once you have a reliable estimate of your local computing power, + -- you should adjust the context window to a larger value. + 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 = 'Ollama', + end_point = 'http://localhost:11434/v1/completions', + model = 'qwen2.5-coder:7b', + optional = { + max_tokens = 56, + top_p = 0.9, + }, + }, + }, + } + end, + }, +}