Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set default config when settings are nil #10

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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