fix(mappings): disable when tabufline is disabled
https://github.com/NvChad/ui/pull/514
This commit is contained in:
@@ -29,19 +29,21 @@ end, { desc = "general format file" })
|
||||
map("n", "<leader>ds", vim.diagnostic.setloclist, { desc = "LSP diagnostic loclist" })
|
||||
|
||||
-- tabufline
|
||||
map("n", "<leader>b", "<cmd>enew<CR>", { desc = "buffer new" })
|
||||
if require("nvconfig").ui.tabufline.enabled then
|
||||
map("n", "<leader>b", "<cmd>enew<CR>", { desc = "buffer new" })
|
||||
|
||||
map("n", "<tab>", function()
|
||||
map("n", "<tab>", function()
|
||||
require("nvchad.tabufline").next()
|
||||
end, { desc = "buffer goto next" })
|
||||
end, { desc = "buffer goto next" })
|
||||
|
||||
map("n", "<S-tab>", function()
|
||||
map("n", "<S-tab>", function()
|
||||
require("nvchad.tabufline").prev()
|
||||
end, { desc = "buffer goto prev" })
|
||||
end, { desc = "buffer goto prev" })
|
||||
|
||||
map("n", "<leader>x", function()
|
||||
map("n", "<leader>x", function()
|
||||
require("nvchad.tabufline").close_buffer()
|
||||
end, { desc = "buffer close" })
|
||||
end, { desc = "buffer close" })
|
||||
end
|
||||
|
||||
-- Comment
|
||||
map("n", "<leader>/", "gcc", { desc = "toggle comment", remap = true })
|
||||
|
||||
Reference in New Issue
Block a user