Skip to content

Commit

Permalink
Set default config when settings are nil
Browse files Browse the repository at this point in the history
  • Loading branch information
joerideg committed Jun 11, 2024
1 parent 74a0122 commit 1140810
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lua/aider.lua
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,13 @@ end

function M.setup(config)
M.config = config or {}
M.config.auto_manage_context = M.config.auto_manage_context or true
M.config.default_bindings = M.config.default_bindings or true
if M.config.auto_manage_context == nil then
M.config.auto_manage_context = true
end

if M.config.default_bindings == nil then
M.config.default_bindings = true
end

vim.g.aider_buffer_sync = M.config.auto_manage_context

Expand Down

0 comments on commit 1140810

Please sign in to comment.