local autocmd = vim.api.nvim_create_autocmd local augroup = vim.api.nvim_create_augroup local cmd = vim.api.nvim_create_user_command -- Groups local nvimhelp = augroup("help_window_right", {}) local mkdirrun = augroup("MkdirRun", { clear = true }) cmd("ThemeSwitcher", function() require("taken.functions.themes").themeselector() end, { desc = "Select a theme", }) autocmd("BufWinEnter", { group = nvimhelp, pattern = { "*.txt" }, callback = function() if vim.o.filetype == "help" then vim.cmd.wincmd("L") end end, }) autocmd("BufWritePre", { group = mkdirrun, pattern = { "*" }, callback = function() require("taken.functions.mkdir").run() end, })