mirror of
https://github.com/ThePrimeagen/harpoon.git
synced 2025-07-14 01:50:27 +00:00
Merge pull request #413 from willothy/fix-noencode
fix: check list.config.encode, default save_on_toggle to false
This commit is contained in:
commit
8f67088e9d
@ -14,7 +14,7 @@ M.DEFAULT_LIST = DEFAULT_LIST
|
|||||||
|
|
||||||
---@class HarpoonPartialConfigItem
|
---@class HarpoonPartialConfigItem
|
||||||
---@field select_with_nil? boolean defaults to false
|
---@field select_with_nil? boolean defaults to false
|
||||||
---@field encode? (fun(list_item: HarpoonListItem): string)
|
---@field encode? (fun(list_item: HarpoonListItem): string) | boolean
|
||||||
---@field decode? (fun(obj: string): any)
|
---@field decode? (fun(obj: string): any)
|
||||||
---@field display? (fun(list_item: HarpoonListItem): string)
|
---@field display? (fun(list_item: HarpoonListItem): string)
|
||||||
---@field select? (fun(list_item?: HarpoonListItem, list: HarpoonList, options: any?): nil)
|
---@field select? (fun(list_item?: HarpoonListItem, list: HarpoonList, options: any?): nil)
|
||||||
@ -25,7 +25,7 @@ M.DEFAULT_LIST = DEFAULT_LIST
|
|||||||
---@field get_root_dir? fun(): string
|
---@field get_root_dir? fun(): string
|
||||||
|
|
||||||
---@class HarpoonSettings
|
---@class HarpoonSettings
|
||||||
---@field save_on_toggle boolean defaults to true
|
---@field save_on_toggle boolean defaults to false
|
||||||
---@field sync_on_ui_close? boolean
|
---@field sync_on_ui_close? boolean
|
||||||
---@field key (fun(): string)
|
---@field key (fun(): string)
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ end
|
|||||||
function Harpoon:sync()
|
function Harpoon:sync()
|
||||||
local key = self.config.settings.key()
|
local key = self.config.settings.key()
|
||||||
self:_for_each_list(function(list, _, list_name)
|
self:_for_each_list(function(list, _, list_name)
|
||||||
if list.encode == false then
|
if list.config.encode == false then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user