Skip to main content
Avante.nvim’s behavior settings control how the plugin interacts with your code, handles suggestions, and manages various features.

Auto-Focus Settings

behaviour.auto_focus_sidebar
boolean
default:"true"
Automatically focus the sidebar when opening Avante
behaviour.auto_focus_on_diff_view
boolean
default:"false"
Automatically focus the diff view when changes are applied
behaviour = {
  auto_focus_sidebar = true,
  auto_focus_on_diff_view = false,
}

Auto-Suggestions

behaviour.auto_suggestions
boolean
default:"false"
Enable automatic code suggestions (experimental)
behaviour.auto_suggestions_respect_ignore
boolean
default:"false"
Respect gitignore patterns when generating auto-suggestions
suggestion.debounce
number
default:"600"
Debounce time in milliseconds before triggering auto-suggestions
suggestion.throttle
number
default:"600"
Throttle time in milliseconds for auto-suggestions
behaviour = {
  auto_suggestions = false, -- Still experimental
  auto_suggestions_respect_ignore = false,
},
suggestion = {
  debounce = 600,
  throttle = 600,
}
Auto-suggestions are high-frequency operations and can be expensive. Avoid using expensive providers like Copilot for auto-suggestions. Consider using a separate, cheaper provider via auto_suggestions_provider.

Keymap Settings

behaviour.auto_set_keymaps
boolean
default:"true"
Automatically set keymaps for Avante actions. Only sets keymaps that aren’t already bound.
behaviour = {
  auto_set_keymaps = true,
}

Diff Handling

behaviour.auto_apply_diff_after_generation
boolean
default:"false"
Automatically apply diff after LLM response (similar to Cursor’s behavior)
behaviour.minimize_diff
boolean
default:"true"
Remove unchanged lines when applying code blocks to reduce clutter
behaviour.jump_result_buffer_on_finish
boolean
default:"false"
Automatically jump to the result buffer after generation completes
behaviour = {
  auto_apply_diff_after_generation = false,
  minimize_diff = true,
  jump_result_buffer_on_finish = false,
}

Diff Configuration

diff.autojump
boolean
default:"true"
Automatically jump to diff conflicts
diff.override_timeoutlen
number
default:"500"
Override timeoutlen while hovering over diff to avoid operator-pending mode. Set to -1 to disable.
diff = {
  autojump = true,
  override_timeoutlen = 500,
}

Highlight Groups

behaviour.auto_set_highlight_group
boolean
default:"true"
Automatically set highlight groups for Avante windows
behaviour = {
  auto_set_highlight_group = true,
}

Clipboard Support

behaviour.support_paste_from_clipboard
boolean
default:"false"
Enable pasting images from clipboard (requires img-clip.nvim)
behaviour = {
  support_paste_from_clipboard = false, -- Auto-detected if img-clip is installed
}
This is automatically enabled if img-clip.nvim is installed.

Token Counting

behaviour.enable_token_counting
boolean
default:"true"
Enable token counting for requests and responses
behaviour = {
  enable_token_counting = true,
}

File Management

behaviour.auto_add_current_file
boolean
default:"true"
Automatically add the current file when opening a new chat
behaviour.use_cwd_as_project_root
boolean
default:"false"
Use current working directory as project root instead of detecting via LSP
behaviour.allow_access_to_git_ignored_files
boolean
default:"false"
Allow AI to access files that are in .gitignore
behaviour = {
  auto_add_current_file = true,
  use_cwd_as_project_root = false,
  allow_access_to_git_ignored_files = false,
}

Tool Permissions

behaviour.auto_approve_tool_permissions
boolean | string[]
default:"true"
Control tool permission prompts:
  • true - Auto-approve all tools (no prompts)
  • false - Show permission prompts for all tools
  • string[] - Auto-approve specific tools only
-- Auto-approve all tools (default)
behaviour = {
  auto_approve_tool_permissions = true,
}

-- Show prompts for all tools
behaviour = {
  auto_approve_tool_permissions = false,
}

-- Auto-approve only specific tools
behaviour = {
  auto_approve_tool_permissions = { "bash", "str_replace", "read_file" },
}

Diagnostics

behaviour.auto_check_diagnostics
boolean
default:"true"
Automatically check and include diagnostics in AI context
behaviour = {
  auto_check_diagnostics = true,
}

Fast Apply

behaviour.enable_fastapply
boolean
default:"false"
Enable Fast Apply feature for instant code edits using specialized models
behaviour = {
  enable_fastapply = false,
}
See the Fast Apply guide for more information on this feature.

Git Integration

behaviour.include_generated_by_commit_line
boolean
default:"false"
Add a “Generated-by: provider/model” line to git commit messages
behaviour = {
  include_generated_by_commit_line = false,
}

Confirmation UI Style

behaviour.confirmation_ui_style
'popup' | 'inline_buttons'
default:"inline_buttons"
Style of confirmation UI:
  • popup - Original floating window with yes/all/no buttons
  • inline_buttons - Inline buttons in the sidebar
behaviour = {
  confirmation_ui_style = "inline_buttons",
}

ACP Agent Settings

behaviour.acp_follow_agent_locations
boolean
default:"true"
Automatically open files and navigate to lines when ACP agent makes edits
behaviour = {
  acp_follow_agent_locations = true,
}

Selection Settings

selection.enabled
boolean
default:"true"
Enable selection mode for asking questions about selected code
selection.hint_display
'delayed' | 'immediate' | 'none'
default:"delayed"
When to show keymap hints for selection mode
selection = {
  enabled = true,
  hint_display = "delayed", -- delayed | immediate | none
}

History Settings

history.max_tokens
number
default:"4096"
Maximum tokens to keep in chat history
history.carried_entry_count
number | nil
default:"nil"
Number of history entries to carry over to new chats
history.storage_path
string
Path where chat history is stored
history = {
  max_tokens = 4096,
  carried_entry_count = nil,
  storage_path = vim.fn.stdpath("state") .. "/avante",
}

Prompt Logger

prompt_logger.enabled
boolean
default:"true"
Enable logging prompts to disk for debugging/replay
prompt_logger.log_dir
string
Directory where prompt logs are saved
prompt_logger.max_entries
number
default:"100"
Maximum number of prompt log entries to keep
prompt_logger = {
  enabled = true,
  log_dir = vim.fn.stdpath("cache"),
  max_entries = 100,
  next_prompt = {
    normal = "<C-n>",
    insert = "<C-n>",
  },
  prev_prompt = {
    normal = "<C-p>",
    insert = "<C-p>",
  },
}

Complete Behavior Configuration Example

require('avante').setup({
  behaviour = {
    -- Focus
    auto_focus_sidebar = true,
    auto_focus_on_diff_view = false,
    
    -- Suggestions
    auto_suggestions = false,
    auto_suggestions_respect_ignore = false,
    
    -- Keymaps and highlights
    auto_set_keymaps = true,
    auto_set_highlight_group = true,
    
    -- Diff handling
    auto_apply_diff_after_generation = false,
    minimize_diff = true,
    jump_result_buffer_on_finish = false,
    
    -- Features
    support_paste_from_clipboard = false,
    enable_token_counting = true,
    enable_fastapply = false,
    
    -- File management
    auto_add_current_file = true,
    use_cwd_as_project_root = false,
    allow_access_to_git_ignored_files = false,
    
    -- Tool permissions
    auto_approve_tool_permissions = true,
    
    -- Diagnostics
    auto_check_diagnostics = true,
    
    -- Git
    include_generated_by_commit_line = false,
    
    -- UI
    confirmation_ui_style = "inline_buttons",
    
    -- ACP
    acp_follow_agent_locations = true,
  },
  
  selection = {
    enabled = true,
    hint_display = "delayed",
  },
  
  diff = {
    autojump = true,
    override_timeoutlen = 500,
  },
  
  suggestion = {
    debounce = 600,
    throttle = 600,
  },
  
  history = {
    max_tokens = 4096,
    carried_entry_count = nil,
    storage_path = vim.fn.stdpath("state") .. "/avante",
  },
  
  prompt_logger = {
    enabled = true,
    log_dir = vim.fn.stdpath("cache"),
    max_entries = 100,
  },
})

Tips

Start with auto_suggestions = false until you’re comfortable with the plugin, as auto-suggestions can be distracting initially.
Enable minimize_diff = true to reduce clutter when reviewing AI-generated changes.
Use auto_approve_tool_permissions = false in sensitive environments where you want explicit control over what the AI can do.
Set enable_fastapply = true with Morph provider for instant code edits without delays.

Build docs developers (and LLMs) love