These are list of some functions & tips/tricks which are provided by nvchad plugins that aren't included in the config. You can make commands & mappings out of them.
vim.t.bufs
tab table variable where we store buffer numbers of current tab.for i = 1, 9, 1 do
vim.keymap.set("n", string.format("<A-%s>", i), function()
vim.api.nvim_set_current_buf(vim.t.bufs[i])
end)
end
-- move buffer right
require("nvchad_ui.tabufline").move_buf(1)
-- move buffer left
require("nvchad_ui.tabufline").move_buf(-1)
require("base46").toggle_transparency()
theme_toggle
option set in your chadrc.require("base46").toggle_theme()
require("nvchad_ui.tabufline").closeAllBufs()
custom/init.lua
vim.api.nvim_create_autocmd({ "BufAdd", "BufEnter", "tabnew" }, {
callback = function()
vim.t.bufs = vim.tbl_filter(function(bufnr)
return vim.api.nvim_buf_get_option(bufnr, "modified")
end, vim.t.bufs)
end,
})