aboutsummaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorsrdusr <trevorgray@srdusr.com>2023-02-19 14:34:20 +0200
committersrdusr <trevorgray@srdusr.com>2023-02-19 14:34:20 +0200
commit6ca95abdcad5f718587baddb55ecf19fce2851d5 (patch)
tree69fed4d29364592d0e4c68ad4a3671f93661c0d3 /lua
parenta84ddad43a14c7e73477da73e77388c18001513d (diff)
downloaddotfiles-6ca95abdcad5f718587baddb55ecf19fce2851d5.tar.gz
dotfiles-6ca95abdcad5f718587baddb55ecf19fce2851d5.zip
Add quickfix settings
Diffstat (limited to 'lua')
-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