disable tabpages by closing and switching to buffer

This commit is contained in:
Baipyrus 2024-11-20 10:32:21 +01:00
parent cafa3b1b80
commit 2c46e4dd46

View File

@ -96,6 +96,16 @@ vim.opt.guicursor = 'n-v-i-c:block-Cursor'
vim.o.laststatus = 3 vim.o.laststatus = 3
vim.api.nvim_set_hl(0, 'WinSeparator', { bg = nil }) vim.api.nvim_set_hl(0, 'WinSeparator', { bg = nil })
-- Disable tabpages
vim.api.nvim_create_autocmd('TabNew', {
group = vim.api.nvim_create_augroup('TabGroup', { clear = true }),
callback = function()
local buf = vim.api.nvim_get_current_buf()
vim.cmd 'tabclose'
vim.api.nvim_set_current_buf(buf)
end,
})
vim.api.nvim_create_autocmd('UIEnter', { vim.api.nvim_create_autocmd('UIEnter', {
group = vim.api.nvim_create_augroup('SetGUISettings', { clear = true }), group = vim.api.nvim_create_augroup('SetGUISettings', { clear = true }),
callback = function() callback = function()