Basic Setup
Harpoon is configured through itssetup() function. You can call it in your Neovim configuration file:
setup():
Configuration File Locations
Harpoon uses two JSON files to store configuration and state:User-defined configuration file. This is where you can manually edit settings that persist across sessions.Located at:
vim.fn.stdpath("config") .. "/harpoon.json"Runtime cache and data storage. Harpoon automatically saves marks and state here.Located at:
vim.fn.stdpath("data") .. "/harpoon.json"The config path (
~/.config/nvim/harpoon.json) takes precedence over the data path. Harpoon merges configurations from both locations, with later values overriding earlier ones.Configuration Precedence
Harpoon merges configuration from multiple sources in this order:- Default settings (built into Harpoon)
- Cache config from data path (
~/.local/share/nvim/harpoon.json) - User config from config path (
~/.config/nvim/harpoon.json) - Runtime config passed to
setup()
setup() call has the highest priority.
Minimal Configuration
The absolute minimal setup - just load Harpoon with defaults:- File marks per project
- Auto-save on file changes
- No terminal command automation
- Single project workspace (not git branch-specific)
Full Configuration Example
A complete configuration showcasing all available options:Dynamic Configuration
You can make configuration dynamic based on your environment:Verifying Configuration
To debug or verify your current configuration:Next Steps
Global Settings
Configure behavior that applies across all projects
Project Settings
Set up project-specific commands and marks