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>") })()
@@ -35,6 +35,12 @@ map("n", "<M-q>", function()
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" })
@@ -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.)",
}, },