mirror of
https://github.com/ThePrimeagen/harpoon.git
synced 2025-07-13 17:40:25 +00:00
This commit is contained in:
parent
4dbd024b32
commit
2719d54965
@ -30,6 +30,24 @@ local M = {}
|
||||
--]]
|
||||
harpoon_config = harpoon_config or {}
|
||||
|
||||
function ensure_correct_config(config)
|
||||
local projects = config.projects
|
||||
if projects[cwd] == nil then
|
||||
projects[cwd] = {
|
||||
marks = {},
|
||||
term = {},
|
||||
}
|
||||
end
|
||||
|
||||
if projects[cwd].marks == nil then
|
||||
projects[cwd].marks = {}
|
||||
end
|
||||
|
||||
if projects[cwd].term == nil then
|
||||
projects[cwd].term = {}
|
||||
end
|
||||
end
|
||||
|
||||
function expand_dir(config)
|
||||
local projects = config.projects or {}
|
||||
local expanded_config = {}
|
||||
@ -83,6 +101,10 @@ M.setup = function(config)
|
||||
expand_dir(u_config),
|
||||
expand_dir(config))
|
||||
|
||||
-- There was this issue where the cwd didn't have marks or term, but had
|
||||
-- an object for cwd
|
||||
ensure_correct_config(complete_config)
|
||||
|
||||
terminals.setup(complete_config)
|
||||
mark.setup(complete_config)
|
||||
harpoon_config = complete_config
|
||||
|
Loading…
x
Reference in New Issue
Block a user