From 2c46e4dd4687f7e7c95a68521ef00dcd0959eed7 Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Wed, 20 Nov 2024 10:32:21 +0100 Subject: [PATCH] disable tabpages by closing and switching to buffer --- lua/options.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lua/options.lua b/lua/options.lua index a43fa62..cbf6702 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -96,6 +96,16 @@ vim.opt.guicursor = 'n-v-i-c:block-Cursor' vim.o.laststatus = 3 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', { group = vim.api.nvim_create_augroup('SetGUISettings', { clear = true }), callback = function()