Overview
Global settings control Harpoon’s behavior across all projects. These are configured within theglobal_settings table passed to setup():
All Global Settings
save_on_toggle
When enabled, saves marks to disk when toggling the UI menu instead of requiring
:w to save manually.- You want marks saved immediately when closing the quick menu
- You don’t want to manually save the marks file
- You prefer explicit control over when marks are persisted
- You want to review changes before saving
With
save_on_toggle = false, you need to manually save the marks menu with :w before closing it to persist changes.save_on_change
Automatically saves the harpoon file whenever marks are modified. Disabling this is not recommended.
- Adding new marks with
require("harpoon.mark").add_file() - Removing marks
- Reordering marks
- Updating mark positions in files
enter_on_sendcmd
When enabled, automatically presses Enter after sending a command to a terminal with
sendCommand().false: Command is typed but not executed (you can edit before running)true: Command is immediately executed in the terminal
tmux_autoclose_windows
Automatically closes any tmux windows created by Harpoon when you exit Neovim.
- Enable: You want clean tmux sessions without leftover windows
- Disable: You want tmux windows to persist after closing Neovim
This only affects tmux windows created through
require("harpoon.tmux").gotoTerminal() or sendCommand(), not manually created tmux windows.excluded_filetypes
List of filetypes that should not be added to the harpoon marks list.
- Plugin UI windows (
"NvimTree","neo-tree") - Fuzzy finders (
"TelescopePrompt","fzf") - Help files (
"help") - Temporary buffers (
"nofile","terminal")
mark_branch
When enabled, stores marks separately for each git branch within a git repository.
false: Marks are shared across all branches in a projecttrue: Each git branch has its own set of marks
mark_branch = true, switching branches automatically switches to that branch’s marks.
Example: Branch-Specific Workflow
Example: Branch-Specific Workflow
Scenario: You’re working on two features:With
- Branch
feature/auth: Files arelogin.tsx,signup.tsx,auth.utils.ts - Branch
feature/dashboard: Files aredashboard.tsx,widgets.tsx,data.service.ts
mark_branch = true:mark_branch = false, both branches share the same marks list.tabline
Enables a tabline at the top of Neovim showing your harpoon marks.
Customize tabline colors using these highlight groups:
HarpoonInactive: Inactive marksHarpoonActive: Currently active markHarpoonNumberActive: Number of active markHarpoonNumberInactive: Number of inactive marks
tabline_prefix
String to display before each mark in the tabline.
tabline_suffix
String to display after each mark in the tabline.