plugin: Use Comment.nvim | Resolve #646 & #626

pull/656/head
Akianonymus 3 years ago committed by siduck
parent 16d035c031
commit d2db2cc1cd

@ -124,8 +124,8 @@ end
M.comment = function()
local m = plugin_maps.comment.toggle
map("n", m, ":CommentToggle <CR>")
map("v", m, ":CommentToggle <CR>")
map("n", m, ":lua require('Comment.api').toggle()<CR>")
map("v", m, ":lua require('Comment.api').gc(vim.fn.visualmode())<CR>")
end
M.dashboard = function()

@ -62,7 +62,7 @@ M.colorizer = function()
end
M.comment = function()
local present, nvim_comment = pcall(require, "nvim_comment")
local present, nvim_comment = pcall(require, "Comment")
if present then
nvim_comment.setup()
end

@ -191,11 +191,12 @@ return packer.startup(function()
}
use {
"terrortylor/nvim-comment",
"numToStr/Comment.nvim",
disable = not plugin_settings.status.comment,
cmd = "CommentToggle",
module = "Comment",
config = override_req("nvim_comment", "(plugins.configs.others).comment()"),
setup = function()
require("core.utils").packer_lazy_load "Comment.nvim"
require("core.mappings").comment()
end,
}

Loading…
Cancel
Save