From f107fabe11ac8013dc3435ecd5382bee872b1584 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 20 Sep 2025 06:11:18 +0530 Subject: [PATCH] fix(mappings): disable when tabufline is disabled https://github.com/NvChad/ui/pull/514 --- lua/nvchad/mappings.lua | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/lua/nvchad/mappings.lua b/lua/nvchad/mappings.lua index 26ee11f..771b70b 100644 --- a/lua/nvchad/mappings.lua +++ b/lua/nvchad/mappings.lua @@ -29,19 +29,21 @@ end, { desc = "general format file" }) map("n", "ds", vim.diagnostic.setloclist, { desc = "LSP diagnostic loclist" }) -- tabufline -map("n", "b", "enew", { desc = "buffer new" }) +if require("nvconfig").ui.tabufline.enabled then + map("n", "b", "enew", { desc = "buffer new" }) -map("n", "", function() - require("nvchad.tabufline").next() -end, { desc = "buffer goto next" }) + map("n", "", function() + require("nvchad.tabufline").next() + end, { desc = "buffer goto next" }) -map("n", "", function() - require("nvchad.tabufline").prev() -end, { desc = "buffer goto prev" }) + map("n", "", function() + require("nvchad.tabufline").prev() + end, { desc = "buffer goto prev" }) -map("n", "x", function() - require("nvchad.tabufline").close_buffer() -end, { desc = "buffer close" }) + map("n", "x", function() + require("nvchad.tabufline").close_buffer() + end, { desc = "buffer close" }) +end -- Comment map("n", "/", "gcc", { desc = "toggle comment", remap = true })