AI stuff
This commit is contained in:
45
lua/plugins/minuet.lua
Normal file
45
lua/plugins/minuet.lua
Normal file
@@ -0,0 +1,45 @@
|
||||
-- AI code completion
|
||||
-- A
|
||||
return {
|
||||
'milanglacier/minuet-ai.nvim',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
config = function()
|
||||
require('minuet').setup {
|
||||
virtualtext = {
|
||||
auto_trigger_ft = { 'lua' },
|
||||
keymap = {
|
||||
accept = '<A-A>',
|
||||
accept_line = '<A-a>',
|
||||
-- accept n lines (prompts for number)
|
||||
-- e.g. "A-z 2 CR" will accept 2 lines
|
||||
accept_n_lines = '<A-z>',
|
||||
-- Cycle to prev completion item, or manually invoke completion
|
||||
prev = '<A-[>',
|
||||
-- Cycle to next completion item, or manually invoke completion
|
||||
next = '<A-]>',
|
||||
dismiss = '<A-e>',
|
||||
},
|
||||
},
|
||||
provider = 'openai_compatible',
|
||||
request_timeout = 3,
|
||||
throttle = 1500, -- Increase to reduce costs and avoid rate limits
|
||||
debounce = 600, -- Increase to reduce costs and avoid rate limits
|
||||
provider_options = {
|
||||
openai_compatible = {
|
||||
api_key = 'COMPLETION_OPENAI_API_KEY',
|
||||
end_point = vim.env.COMPLETION_OPENAI_API_BASE .. '/v1/chat/completions',
|
||||
model = vim.env.COMPLETION_MODEL,
|
||||
name = 'Openrouter',
|
||||
optional = {
|
||||
max_tokens = 2000,
|
||||
top_p = 0.9,
|
||||
provider = {
|
||||
-- Prioritize throughput for faster completion
|
||||
sort = 'throughput',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
||||
Reference in New Issue
Block a user