feat(save): remove dead code to prevent nil value on save

`get_config()` is removed and replaced by
`get_term_config()` and `get_mark_config()`
This commit is contained in:
Asbjørn Håland 2021-02-23 23:35:26 +01:00
parent 5c0ab042f9
commit b45b04dc57

View File

@ -85,16 +85,6 @@ function expand_dir(config)
end
M.save = function()
local term_config = terminals.get_config()
local mark_config = mark.get_config()
if not harpoon_config.projects[cwd] then
harpoon_config.projects[cwd] = {}
end
harpoon_config.projects[cwd].term = term_config
harpoon_config.projects[cwd].mark = mark_config
Path:new(cache_config):write(vim.fn.json_encode(harpoon_config), 'w')
end