summaryrefslogtreecommitdiff
path: root/lua/core/commands.lua
diff options
context:
space:
mode:
authorLuc Sinet <[email protected]>2021-07-26 19:14:23 +0200
committerGitHub <[email protected]>2021-07-26 13:14:23 -0400
commit12c0a7441e6a18ee140b68cf8fc6d1c6468fd699 (patch)
tree521e00ac68eb6d094222897b91d13b57701a1588 /lua/core/commands.lua
parent623994af2ae71a575fe5fc544e4bde36fdcdf006 (diff)
[Refactor] remove lv prefix (#1112)
* Rename lv-utils into utils * Move commands defined in utils into core/commands.lua
Diffstat (limited to 'lua/core/commands.lua')
-rw-r--r--lua/core/commands.lua21
1 files changed, 21 insertions, 0 deletions
diff --git a/lua/core/commands.lua b/lua/core/commands.lua
new file mode 100644
index 00000000..c42b385d
--- /dev/null
+++ b/lua/core/commands.lua
@@ -0,0 +1,21 @@
+local M = {}
+
+M.defaults = {
+ [[
+ function! QuickFixToggle()
+ if empty(filter(getwininfo(), 'v:val.quickfix'))
+ copen
+ else
+ cclose
+ endif
+ endfunction
+ ]],
+}
+
+M.load = function(commands)
+ for _, command in ipairs(commands) do
+ vim.cmd(command)
+ end
+end
+
+return M