mirror of
https://github.com/ThePrimeagen/harpoon.git
synced 2025-07-13 17:40:25 +00:00
fix(logging): Some logging and better initial values
This commit is contained in:
parent
a6050f3e52
commit
92cc92b8e1
@ -34,17 +34,21 @@ function ensure_correct_config(config)
|
||||
local projects = config.projects
|
||||
if projects[cwd] == nil then
|
||||
projects[cwd] = {
|
||||
marks = {},
|
||||
term = {},
|
||||
mark = {
|
||||
marks = {}
|
||||
},
|
||||
term = {
|
||||
cmds = {}
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
if projects[cwd].marks == nil then
|
||||
projects[cwd].marks = {}
|
||||
projects[cwd].mark = {marks = {}}
|
||||
end
|
||||
|
||||
if projects[cwd].term == nil then
|
||||
projects[cwd].term = {}
|
||||
projects[cwd].term = {cmds = {}}
|
||||
end
|
||||
end
|
||||
|
||||
@ -110,5 +114,13 @@ M.setup = function(config)
|
||||
harpoon_config = complete_config
|
||||
end
|
||||
|
||||
-- should only be called for debug purposes
|
||||
M.print_config = function()
|
||||
print(vim.inspect(harpoon_config))
|
||||
end
|
||||
|
||||
-- Sets a default config with no values
|
||||
M.setup({projects = {}})
|
||||
|
||||
return M
|
||||
|
||||
|
@ -1,5 +0,0 @@
|
||||
augroup THE_PRIMEAGEN_HARPOON
|
||||
autocmd!
|
||||
autocmd VimLeave * :lua require('harpoon').save()
|
||||
autocmd BufLeave * :lua require('harpoon.mark').store_offset()
|
||||
augroup END
|
@ -1,5 +1,5 @@
|
||||
augroup THE_PRIMEAGEN_HARPOON
|
||||
autocmd!
|
||||
autocmd VimLeave * :lua require('harpoon').save()
|
||||
autocmd VimLeavePre * :lua require('harpoon').save()
|
||||
autocmd BufLeave * :lua require('harpoon.mark').store_offset()
|
||||
augroup END
|
||||
|
Loading…
x
Reference in New Issue
Block a user