Snippets
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
-- AI code completion
|
||||
|
||||
if (vim.fn.getenv('COPILOT_API_KEY') ~= vim.NIL) then
|
||||
if vim.fn.getenv 'COPILOT_API_KEY' ~= vim.NIL then
|
||||
return {
|
||||
'zbirenbaum/copilot.lua',
|
||||
event = 'InsertEnter',
|
||||
@@ -10,7 +10,7 @@ if (vim.fn.getenv('COPILOT_API_KEY') ~= vim.NIL) then
|
||||
enabled = true,
|
||||
auto_trigger = true,
|
||||
keymap = {
|
||||
accept = '<Tab>',
|
||||
accept = '<A-a>',
|
||||
},
|
||||
},
|
||||
filetypes = {
|
||||
@@ -48,8 +48,9 @@ return {
|
||||
provider = 'openai_compatible',
|
||||
request_timeout = 3,
|
||||
throttle = 500, -- Increase to reduce costs and avoid rate limits
|
||||
debounce = 300, -- Increase to reduce costs and avoid rate limits
|
||||
debounce = 400, -- Increase to reduce costs and avoid rate limits
|
||||
n_completions = 1,
|
||||
before_cursor_filter_length = 10,
|
||||
provider_options = {
|
||||
openai_compatible = {
|
||||
api_key = 'COMPLETION_OPENAI_API_KEY',
|
||||
|
||||
Reference in New Issue
Block a user