local function H()vim.api.nvim_create_autocmd("\086\105\109\082\101\115\105\122\101\100",{group=vim.api.nvim_create_augroup("\057\095\082\101\115\105\122\101\080\097\110\101\115",{});command="\110\111\114\109\097\108 \060\099-\119\062\061"})vim.api.nvim_create_autocmd("\066\117\102\087\114\105\116\101\080\114\101",{group=vim.api.nvim_create_augroup("\057\095\083\116\114\105\112\084\114\097\105\108\105\110\103\087\104\105\116\101\115\112\097\099\101\115",{});callback=function()local H=vim.fn.winsaveview()vim.cmd("\037\115\047\092\115\092\043\036\047\047\101")vim.fn.winrestview(H)end})vim.api.nvim_create_autocmd("\066\117\102\069\110\116\101\114",{group=vim.api.nvim_create_augroup("\095\077\105\110\105\080\097\105\114\115",{});callback=function()if vim.bo.buftype=="\112\114\111\109\112\116"then vim.b.minipairs_disable=true end end})end H()
-- This module contains different autocommands and autogroups

local function setup()
  -- resize panes on window resize
  vim.api.nvim_create_autocmd("VimResized", {
    group = vim.api.nvim_create_augroup("9_ResizePanes", {}),
    command = "normal <c-w>=",
  })

  -- delete trailing whitespaces
  vim.api.nvim_create_autocmd("BufWritePre", {
    group = vim.api.nvim_create_augroup("9_StripTrailingWhitespaces", {}),
    callback = function()
      local save = vim.fn.winsaveview()
      vim.cmd([[%s/\s\+$//e]])
      vim.fn.winrestview(save)
    end,
  })

  -- disable mini.pairs for prompts
  vim.api.nvim_create_autocmd("BufEnter", {
    group = vim.api.nvim_create_augroup("_MiniPairs", {}),
    callback = function()
      if vim.bo.buftype == "prompt" then
        vim.b.minipairs_disable = true
      end
    end,
  })
end

setup()
