mirror of
https://github.com/ThePrimeagen/harpoon.git
synced 2025-07-14 10:00:29 +00:00
fix: settings section
This commit is contained in:
parent
0db652a612
commit
e8cd1ee316
21
README.md
21
README.md
@ -162,6 +162,27 @@ There is quite a bit of behavior you can configure via `harpoon:setup()`
|
|||||||
### Settings
|
### Settings
|
||||||
Settings can alter the experience of harpoon
|
Settings can alter the experience of harpoon
|
||||||
|
|
||||||
|
**Definition**
|
||||||
|
```lua
|
||||||
|
---@class HarpoonSettings
|
||||||
|
---@field save_on_toggle boolean defaults to true
|
||||||
|
---@field key (fun(): string)
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
**Descriptions**
|
||||||
|
* `save_on_toggle`: any time the ui menu is closed then we will sync the state back to the backing list
|
||||||
|
* `key` how the out list key is looked up. This can be useful when using worktrees and using git remote instead of file path
|
||||||
|
|
||||||
|
**Defaults**
|
||||||
|
```lua
|
||||||
|
settings = {
|
||||||
|
save_on_toggle = false,
|
||||||
|
key = function()
|
||||||
|
return vim.loop.cwd()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
```
|
||||||
|
|
||||||
## ⇁ Social
|
## ⇁ Social
|
||||||
For questions about Harpoon, there's a #harpoon channel on [the Primeagen's Discord](https://discord.gg/theprimeagen) server.
|
For questions about Harpoon, there's a #harpoon channel on [the Primeagen's Discord](https://discord.gg/theprimeagen) server.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user