add visibility handling for the floating window
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
local M = {}
|
||||
|
||||
M.defaults = {
|
||||
local defaults = {
|
||||
runner_modules = {
|
||||
"test-samurai.runners.go",
|
||||
"test-samurai.runners.js-jest",
|
||||
@@ -9,18 +9,18 @@ M.defaults = {
|
||||
},
|
||||
}
|
||||
|
||||
M.options = vim.deepcopy(M.defaults)
|
||||
local current = vim.deepcopy(defaults)
|
||||
|
||||
function M.setup(opts)
|
||||
if not opts or next(opts) == nil then
|
||||
M.options = vim.deepcopy(M.defaults)
|
||||
function M.set(opts)
|
||||
if type(opts) ~= "table" then
|
||||
current = vim.deepcopy(defaults)
|
||||
return
|
||||
end
|
||||
M.options = vim.tbl_deep_extend("force", M.defaults, opts)
|
||||
current = vim.tbl_deep_extend("force", vim.deepcopy(defaults), opts)
|
||||
end
|
||||
|
||||
function M.get()
|
||||
return M.options
|
||||
return current or defaults
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
Reference in New Issue
Block a user