mirror of
https://github.com/CompeyDev/my-nvim-setup.git
synced 2024-12-13 21:40:37 +00:00
parent
16d035c031
commit
d2db2cc1cd
3 changed files with 6 additions and 5 deletions
|
@ -124,8 +124,8 @@ end
|
||||||
|
|
||||||
M.comment = function()
|
M.comment = function()
|
||||||
local m = plugin_maps.comment.toggle
|
local m = plugin_maps.comment.toggle
|
||||||
map("n", m, ":CommentToggle <CR>")
|
map("n", m, ":lua require('Comment.api').toggle()<CR>")
|
||||||
map("v", m, ":CommentToggle <CR>")
|
map("v", m, ":lua require('Comment.api').gc(vim.fn.visualmode())<CR>")
|
||||||
end
|
end
|
||||||
|
|
||||||
M.dashboard = function()
|
M.dashboard = function()
|
||||||
|
|
|
@ -62,7 +62,7 @@ M.colorizer = function()
|
||||||
end
|
end
|
||||||
|
|
||||||
M.comment = function()
|
M.comment = function()
|
||||||
local present, nvim_comment = pcall(require, "nvim_comment")
|
local present, nvim_comment = pcall(require, "Comment")
|
||||||
if present then
|
if present then
|
||||||
nvim_comment.setup()
|
nvim_comment.setup()
|
||||||
end
|
end
|
||||||
|
|
|
@ -191,11 +191,12 @@ return packer.startup(function()
|
||||||
}
|
}
|
||||||
|
|
||||||
use {
|
use {
|
||||||
"terrortylor/nvim-comment",
|
"numToStr/Comment.nvim",
|
||||||
disable = not plugin_settings.status.comment,
|
disable = not plugin_settings.status.comment,
|
||||||
cmd = "CommentToggle",
|
module = "Comment",
|
||||||
config = override_req("nvim_comment", "(plugins.configs.others).comment()"),
|
config = override_req("nvim_comment", "(plugins.configs.others).comment()"),
|
||||||
setup = function()
|
setup = function()
|
||||||
|
require("core.utils").packer_lazy_load "Comment.nvim"
|
||||||
require("core.mappings").comment()
|
require("core.mappings").comment()
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue