Update comment uncommet

This commit is contained in:
2026-06-25 12:06:46 +05:30
parent d5ac4f54a1
commit f039924a13
4 changed files with 21 additions and 17 deletions
@@ -1,7 +1,6 @@
{ {
"extras": [ "extras": [
"lazyvim.plugins.extras.ai.copilot", "lazyvim.plugins.extras.ai.copilot",
"lazyvim.plugins.extras.coding.mini-surround",
"lazyvim.plugins.extras.formatting.prettier", "lazyvim.plugins.extras.formatting.prettier",
"lazyvim.plugins.extras.lang.docker", "lazyvim.plugins.extras.lang.docker",
"lazyvim.plugins.extras.lang.json", "lazyvim.plugins.extras.lang.json",
@@ -63,12 +63,6 @@ vim.api.nvim_create_user_command("Code", function()
vim.cmd("!code ./ -g %:" .. (vim.fn.line(".") + 1)) vim.cmd("!code ./ -g %:" .. (vim.fn.line(".") + 1))
end, { desc = "Open in VS Code at current line" }) end, { desc = "Open in VS Code at current line" })
--- @section keymaps-grep (defined as keymap in vim.cmd, moved here for clarity)
-- <C-/>: Search word under cursor with custom Gr command
vim.keymap.set("n", "<C-/>", function()
vim.cmd("Gr " .. vim.fn.expand("<cword>"))
end, { desc = "Grep word under cursor (custom Gr)" })
-- <C-G>: Live grep word under cursor via Snacks picker -- <C-G>: Live grep word under cursor via Snacks picker
vim.keymap.set("n", "<C-G>", function() vim.keymap.set("n", "<C-G>", function()
LazyVim.pick("live_grep", { default_text = vim.fn.expand("<cword>") })() LazyVim.pick("live_grep", { default_text = vim.fn.expand("<cword>") })()
@@ -11,15 +11,15 @@ local map = vim.keymap.set
-- LazyVim provides <leader>bj for BufferLinePick (interactive pick). -- LazyVim provides <leader>bj for BufferLinePick (interactive pick).
-- These direct-access keys are preserved from your LunarVim config. -- These direct-access keys are preserved from your LunarVim config.
for i = 1, 9 do for i = 1, 9 do
map("n", "<M-" .. i .. ">", function() map("n", "<M-" .. i .. ">", function()
vim.cmd("BufferLineGoToBuffer " .. i) vim.cmd("BufferLineGoToBuffer " .. i)
end, { desc = "Go to buffer " .. i }) end, { desc = "Go to buffer " .. i })
end end
--- @section keymaps-picker --- @section keymaps-picker
-- <C-p>: Quick file find (Snacks picker replaces your Telescope "fd" picker) -- <C-p>: Quick file find (Snacks picker replaces your Telescope "fd" picker)
map("n", "<C-p>", function() map("n", "<C-p>", function()
LazyVim.pick("files")() LazyVim.pick("files")()
end, { desc = "Find Files" }) end, { desc = "Find Files" })
--- @section keymaps-external --- @section keymaps-external
@@ -31,10 +31,16 @@ map("n", "<Leader><Leader>g", ":!git gui &<CR>", { desc = "Open Git GUI" })
-- File-level operations -- File-level operations
map("n", "<M-r>", ":e!<CR>", { desc = "Reload current file (discard changes)" }) map("n", "<M-r>", ":e!<CR>", { desc = "Reload current file (discard changes)" })
map("n", "<M-q>", function() map("n", "<M-q>", function()
Snacks.bufdelete() Snacks.bufdelete()
end, { desc = "Delete current buffer (preserves window layout)" }) end, { desc = "Delete current buffer (preserves window layout)" })
map("n", "<M-Q>", ":bd!<CR>", { desc = "Force delete buffer and close window" }) map("n", "<M-Q>", ":bd!<CR>", { desc = "Force delete buffer and close window" })
--- @section keymaps-comment
-- Toggle comment with Space+/ (normal and visual)
map("n", "c<Space>", "gcc", { desc = "Toggle comment", remap = true })
map("n", "<Space>/", "gcc", { desc = "Toggle comment", remap = true })
-- map("v", "<Space>/", "gc", { desc = "Toggle comment" })
--- @section keymaps-visual --- @section keymaps-visual
-- Visual mode operations -- Visual mode operations
map("v", "<C-h>", '"fy:%s#<C-r>f#', { desc = "Replace all occurrences of selected text" }) map("v", "<C-h>", '"fy:%s#<C-r>f#', { desc = "Replace all occurrences of selected text" })
@@ -84,14 +90,14 @@ map("n", "<C-S-T>", ":tabedit<CR>", { desc = "Open new tab" })
-- Quick DAP access keys (dap.core extra provides <leader>d prefix mappings) -- Quick DAP access keys (dap.core extra provides <leader>d prefix mappings)
-- These F-keys provide direct access to the most common debugging actions. -- These F-keys provide direct access to the most common debugging actions.
map("n", "<F5>", function() map("n", "<F5>", function()
require("dap").continue() require("dap").continue()
end, { desc = "DAP: Continue / Start debugging" }) end, { desc = "DAP: Continue / Start debugging" })
map("n", "<F10>", function() map("n", "<F10>", function()
require("dap").step_over() require("dap").step_over()
end, { desc = "DAP: Step over" }) end, { desc = "DAP: Step over" })
map("n", "<F11>", function() map("n", "<F11>", function()
require("dap").step_into() require("dap").step_into()
end, { desc = "DAP: Step into" }) end, { desc = "DAP: Step into" })
map("n", "<F12>", function() map("n", "<F12>", function()
require("dap").step_out() require("dap").step_out()
end, { desc = "DAP: Step out" }) end, { desc = "DAP: Step out" })
@@ -127,8 +127,13 @@ return {
--- @section plugins-nvim-surround --- @section plugins-nvim-surround
{ {
"kylechui/nvim-surround", "kylechui/nvim-surround",
keys = {
{ "S", mode = "v", desc = "Surround selection" },
},
config = function() config = function()
require("nvim-surround").setup({}) require("nvim-surround").setup({
keymaps = { visual = "S" },
})
end, end,
desc = "Surround text objects (parentheses, quotes, tags, etc.)", desc = "Surround text objects (parentheses, quotes, tags, etc.)",
}, },