1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
local M = {} M.close = function() vim.cmd.cclose() end M.open = function() if vim.tbl_count(vim.fn.getqflist()) == 0 then vim.notify( "Nothing in quickfix list; not opening.", vim.log.levels.WARN ) else vim.cmd.copen() end end return M