added buffer keybinds and leetcode
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
|
||||
"leetcode.nvim": { "branch": "master", "commit": "4e8b3683940a8377379ce9398e7f329e3560b42c" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "221ce6b2d999187044529f49da6554a92f740a96" },
|
||||
"mini.ai": { "branch": "main", "commit": "bfb26d9072670c3aaefab0f53024b2f3729c8083" },
|
||||
"mini.bracketed": { "branch": "main", "commit": "e50e3abcf6a3a5d234f58e4a247dfb3035f30a65" },
|
||||
@@ -11,6 +12,7 @@
|
||||
"mini.surround": { "branch": "main", "commit": "88c52297ed3e69ecf9f8652837888ecc727a28ee" },
|
||||
"mini.tabline": { "branch": "main", "commit": "caf23615b9b99bacc79ecd60f61c4e6a8ec18c84" },
|
||||
"mini.trailspace": { "branch": "main", "commit": "f8083ca969e1b2098480c10f3c3c4d2ce3586680" },
|
||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "85d1145ac71c1b8e1423862c78165a1f609faf60" },
|
||||
"nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "dfbfaa967a6f7ec50789bead7ef87e336c1fa63c" },
|
||||
|
||||
@@ -3,6 +3,16 @@ vim.g.maplocalleader = " "
|
||||
|
||||
vim.keymap.set("n", "<leader>bn", ":bnext<CR>", { desc = "Next buffer" })
|
||||
vim.keymap.set("n", "<leader>bp", ":bprevious<CR>", { desc = "Previous buffer" })
|
||||
vim.keymap.set("n", "<leader>bd", ":bdelete<CR>", { desc = "Delete current buffer" })
|
||||
vim.keymap.set("n", "<leader>bo", function()
|
||||
local current_buf = vim.api.nvim_get_current_buf()
|
||||
local buffers = vim.api.nvim_list_bufs()
|
||||
for _, buf in ipairs(buffers) do
|
||||
if buf ~= current_buf and vim.api.nvim_buf_is_valid(buf) and vim.bo[buf].buflisted then
|
||||
vim.api.nvim_buf_delete(buf, { force = false })
|
||||
end
|
||||
end
|
||||
end, { desc = "Delete other buffers" })
|
||||
|
||||
vim.keymap.set("n", "<leader>sv", ":vsplit<CR>", { desc = "Split window vertically" })
|
||||
vim.keymap.set("n", "<leader>sh", ":split<CR>", { desc = "Split window horizontally" })
|
||||
|
||||
13
lua/plugins/leetcode.lua
Normal file
13
lua/plugins/leetcode.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
return {
|
||||
"kawre/leetcode.nvim",
|
||||
build = ":TSUpdate html", -- if you have `nvim-treesitter` installed
|
||||
dependencies = {
|
||||
-- include a picker of your choice, see picker section for more details
|
||||
"nvim-lua/plenary.nvim",
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
opts = {
|
||||
lang = "python",
|
||||
-- configuration goes here
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user