feature: dump and load data

This commit is contained in:
Lucas F. 2025-01-04 12:54:29 -03:00
parent 684d347f3e
commit ad601a3202
3 changed files with 58 additions and 4 deletions

View file

@ -31,6 +31,10 @@ local defaults = {
},
border = {
style = 'rounded',
text = {
top="",
top_align="left"
}
},
win_options = {
winhighlight = 'Normal:Normal,FloatBorder:FloatBorder',
@ -99,8 +103,14 @@ M.setup = function(config, input_opts, callback)
}
end
M.open = function(opts, callback)
local ui = M.setup(state.user_opts, opts, callback)
M.open = function(opts, popup_opts, callback)
local pop_opts = defaults.popup
state.user_opts = {}
if popup_opts ~= nil or popup_opts == {} then
pop_opts = popup_opts
end
local state_user_opts = fn.merge(state.user_opts, pop_opts)
local ui = M.setup(state_user_opts, opts, callback)
fn.check_nvim()
M.inp = require('nui.input')(ui.popup, ui.input)