commands.lua 541 B

12345678910111213141516171819202122232425
  1. local M = {}
  2. M.defaults = {
  3. [[
  4. function! QuickFixToggle()
  5. if empty(filter(getwininfo(), 'v:val.quickfix'))
  6. copen
  7. else
  8. cclose
  9. endif
  10. endfunction
  11. ]],
  12. -- :LvimInfo
  13. [[ command! LvimInfo lua require('lvim.core.info').toggle_popup(vim.bo.filetype) ]],
  14. [[ command! LvimCacheReset lua require('lvim.utils.hooks').reset_cache() ]],
  15. [[ command! LvimUpdate lua require('lvim.bootstrap').update() ]],
  16. }
  17. M.load = function(commands)
  18. for _, command in ipairs(commands) do
  19. vim.cmd(command)
  20. end
  21. end
  22. return M