style: debug
This commit is contained in:
parent
8d5e05c0d0
commit
b8ecaafff8
|
@ -73,7 +73,7 @@ function M.error(msg, opts)
|
|||
M.notify(msg, vim.tbl_extend("keep", { level = vim.log.levels.ERROR }, opts or {}))
|
||||
end
|
||||
|
||||
---@param msg string
|
||||
---@param msg string|string[]
|
||||
function M.debug(msg, ...)
|
||||
if Config.debug then
|
||||
if select("#", ...) > 0 then
|
||||
|
|
|
@ -482,7 +482,10 @@ function M:open()
|
|||
if count == 0 then
|
||||
if not self.opts.open_no_results then
|
||||
if self.opts.warn_no_results then
|
||||
Util.warn("No results for **" .. self.opts.mode .. "**")
|
||||
Util.warn({
|
||||
"No results for **" .. self.opts.mode .. "**",
|
||||
"Buffer: " .. vim.api.nvim_buf_get_name(self:main().buf),
|
||||
})
|
||||
end
|
||||
return
|
||||
end
|
||||
|
|
|
@ -110,7 +110,11 @@ function M:main_call(fn)
|
|||
fn(main)
|
||||
end)
|
||||
else
|
||||
Util.debug("Main window switched buffers")
|
||||
Util.debug({
|
||||
"Main window switched buffers",
|
||||
"Main: " .. vim.api.nvim_buf_get_name(main.buf),
|
||||
"Current: " .. vim.api.nvim_buf_get_name(vim.api.nvim_win_get_buf(main.win)),
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue