Skip to content

Commit

Permalink
fix(storage): initialize shada on first launch
Browse files Browse the repository at this point in the history
Ref: #1
  • Loading branch information
gbprod committed Mar 24, 2022
1 parent 0bb930d commit 4f21d20
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion lua/yanky.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ function yanky.setup(options)
end

yanky.history = require("yanky.history")
yanky.history.setup(yanky.config)

system_clipboard.setup(yanky.history, yanky.config)
highlight.setup(yanky.config)
Expand Down
3 changes: 3 additions & 0 deletions lua/yanky/storage/shada.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ local shada = {}

function shada.setup(config)
shada.config = config
if nil == vim.g.YANKY_HISTORY then
vim.g.YANKY_HISTORY = {}
end
end

function shada.push(item)
Expand Down

0 comments on commit 4f21d20

Please sign in to comment.