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 })