add comment.nvim and fix lsp keymap
This commit is contained in:
15
lua/config/comment.lua
Normal file
15
lua/config/comment.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
require("Comment").setup({
|
||||
mappings = {
|
||||
---Operator-pending mapping; `gcc` `gbc` `gc[count]{motion}` `gb[count]{motion}`
|
||||
basic = false,
|
||||
---Extra mapping; `gco`, `gcO`, `gcA`
|
||||
extra = false,
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>/", require("Comment.api").toggle.linewise.current)
|
||||
|
||||
vim.keymap.set("v", "<leader>/",
|
||||
'<ESC><CMD>lua require("Comment.api").toggle.linewise(vim.fn.visualmode())<CR>', opts)
|
||||
Reference in New Issue
Block a user