aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lua/plugins/quickfix.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/lua/plugins/quickfix.lua b/lua/plugins/quickfix.lua
new file mode 100644
index 0000000..4ea2374
--- /dev/null
+++ b/lua/plugins/quickfix.lua
@@ -0,0 +1,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