diff --git a/lazy-lock.json b/lazy-lock.json index 2cc3cb8..5601bfb 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -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" }, diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua index ab6015c..159cdbb 100644 --- a/lua/config/keymaps.lua +++ b/lua/config/keymaps.lua @@ -3,6 +3,16 @@ vim.g.maplocalleader = " " vim.keymap.set("n", "bn", ":bnext", { desc = "Next buffer" }) vim.keymap.set("n", "bp", ":bprevious", { desc = "Previous buffer" }) +vim.keymap.set("n", "bd", ":bdelete", { desc = "Delete current buffer" }) +vim.keymap.set("n", "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", "sv", ":vsplit", { desc = "Split window vertically" }) vim.keymap.set("n", "sh", ":split", { desc = "Split window horizontally" }) diff --git a/lua/plugins/leetcode.lua b/lua/plugins/leetcode.lua new file mode 100644 index 0000000..2be0128 --- /dev/null +++ b/lua/plugins/leetcode.lua @@ -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 + }, +}