Add Comment.nvim plugin with <c-/> shortcuts
This commit is contained in:
parent
44063ad379
commit
92ab0206c2
1 changed files with 54 additions and 42 deletions
|
@ -42,4 +42,16 @@ return {
|
|||
{
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
},
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
config = function()
|
||||
-- Configure Comment Shortcuts
|
||||
local comment = require("Comment.api")
|
||||
vim.keymap.set("i", "<C-_>", function()
|
||||
comment.toggle.linewise.current()
|
||||
end, { noremap = true, silent = true })
|
||||
vim.keymap.set("n", "<C-_>", '<Plug>(comment_toggle_linewise_current)')
|
||||
vim.keymap.set("x", "<C-_>", '<Plug>(comment_toggle_linewise_visual)')
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue