feat: enable Comment.nvim and remove mini.comment
This commit is contained in:
4 files changed
+57
-76
No files matched your search
+56
-56
@@ -24,62 +24,62 @@ return {
|
||||
end,
|
||||
},
|
||||
|
||||
-- {
|
||||
-- 'numToStr/Comment.nvim',
|
||||
-- version = false,
|
||||
-- dependencies = {
|
||||
-- 'JoosepAlviste/nvim-ts-context-commentstring',
|
||||
-- },
|
||||
-- config = function()
|
||||
-- require('Comment').setup({
|
||||
-- pre_hook = require('ts_context_commentstring.integrations.comment_nvim').create_pre_hook(),
|
||||
-- mappings = {
|
||||
-- basic = true,
|
||||
-- extra = true,
|
||||
-- },
|
||||
-- })
|
||||
-- end,
|
||||
-- keys = {
|
||||
-- {
|
||||
-- 'gcc',
|
||||
-- mode = 'n',
|
||||
-- desc = 'Toggle comment line',
|
||||
-- },
|
||||
-- {
|
||||
-- 'gc',
|
||||
-- mode = { 'n', 'o' },
|
||||
-- desc = 'Toggle comment linewise',
|
||||
-- },
|
||||
-- {
|
||||
-- 'gc',
|
||||
-- mode = 'x',
|
||||
-- desc = 'Toggle comment linewise (visual)',
|
||||
-- },
|
||||
-- {
|
||||
-- 'gbc',
|
||||
-- mode = 'n',
|
||||
-- desc = 'Toggle comment block',
|
||||
-- },
|
||||
-- {
|
||||
-- 'gb',
|
||||
-- mode = { 'n', 'o' },
|
||||
-- desc = 'Toggle comment blockwise',
|
||||
-- },
|
||||
-- {
|
||||
-- 'gb',
|
||||
-- mode = 'x',
|
||||
-- desc = 'Toggle comment blockwise (visual)',
|
||||
-- },
|
||||
-- { '<leader>/', "<cmd>lua require('Comment.api').toggle.linewise.current()<cr>", desc = 'Toggle comment' },
|
||||
-- {
|
||||
-- '<leader>/',
|
||||
-- "<esc><cmd>lua require('Comment.api').toggle.linewise(vim.fn.visualmode())<cr>",
|
||||
-- desc = 'Toggle comment',
|
||||
-- mode = 'v',
|
||||
-- },
|
||||
-- },
|
||||
-- opts = {},
|
||||
-- },
|
||||
{
|
||||
'numToStr/Comment.nvim',
|
||||
version = false,
|
||||
dependencies = {
|
||||
'JoosepAlviste/nvim-ts-context-commentstring',
|
||||
},
|
||||
config = function()
|
||||
require('Comment').setup({
|
||||
pre_hook = require('ts_context_commentstring.integrations.comment_nvim').create_pre_hook(),
|
||||
mappings = {
|
||||
basic = true,
|
||||
extra = true,
|
||||
},
|
||||
})
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
'gcc',
|
||||
mode = 'n',
|
||||
desc = 'Toggle comment line',
|
||||
},
|
||||
{
|
||||
'gc',
|
||||
mode = { 'n', 'o' },
|
||||
desc = 'Toggle comment linewise',
|
||||
},
|
||||
{
|
||||
'gc',
|
||||
mode = 'x',
|
||||
desc = 'Toggle comment linewise (visual)',
|
||||
},
|
||||
{
|
||||
'gbc',
|
||||
mode = 'n',
|
||||
desc = 'Toggle comment block',
|
||||
},
|
||||
{
|
||||
'gb',
|
||||
mode = { 'n', 'o' },
|
||||
desc = 'Toggle comment blockwise',
|
||||
},
|
||||
{
|
||||
'gb',
|
||||
mode = 'x',
|
||||
desc = 'Toggle comment blockwise (visual)',
|
||||
},
|
||||
{ '<leader>/', "<cmd>lua require('Comment.api').toggle.linewise.current()<cr>", desc = 'Toggle comment' },
|
||||
{
|
||||
'<leader>/',
|
||||
"<esc><cmd>lua require('Comment.api').toggle.linewise(vim.fn.visualmode())<cr>",
|
||||
desc = 'Toggle comment',
|
||||
mode = 'v',
|
||||
},
|
||||
},
|
||||
opts = {},
|
||||
},
|
||||
|
||||
-- Todo Comments
|
||||
{
|
||||
|
||||
@@ -24,14 +24,6 @@ return {
|
||||
end,
|
||||
})
|
||||
|
||||
require('mini.comment').setup({
|
||||
options = {
|
||||
custom_commentstring = function()
|
||||
return require('ts_context_commentstring').calculate_commentstring() or vim.bo.commentstring
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
require('mini.statusline').setup({
|
||||
use_icons = true,
|
||||
content = {
|
||||
|
||||
@@ -1,16 +1,4 @@
|
||||
return {
|
||||
{
|
||||
'JoosepAlviste/nvim-ts-context-commentstring',
|
||||
opts = { enable_autocmd = false },
|
||||
ft = {
|
||||
'javascript',
|
||||
'typescript',
|
||||
'javascriptreact',
|
||||
'typescriptreact',
|
||||
},
|
||||
keys = { { 'gc', mode = { 'n', 'x' } }, { 'gbc', mode = { 'n', 'x' } } },
|
||||
},
|
||||
|
||||
--harpoon
|
||||
{
|
||||
'ThePrimeagen/harpoon',
|
||||
|
||||
Reference in new issue
Block a user