diff --git a/lazy-lock.json b/lazy-lock.json index 6c7711c..ed97aea 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,4 +1,5 @@ { + "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, "LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" }, "Navigator.nvim": { "branch": "master", "commit": "91d86506ac2a039504d5205d32a1d4bc7aa57072" }, "better-escape.nvim": { "branch": "master", "commit": "19a38aab94961016430905ebec30d272a01e9742" }, diff --git a/lua/plugins/editor.lua b/lua/plugins/editor.lua index 7bb5d51..86c6d03 100644 --- a/lua/plugins/editor.lua +++ b/lua/plugins/editor.lua @@ -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)', - -- }, - -- { '/', "lua require('Comment.api').toggle.linewise.current()", desc = 'Toggle comment' }, - -- { - -- '/', - -- "lua require('Comment.api').toggle.linewise(vim.fn.visualmode())", - -- 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)', + }, + { '/', "lua require('Comment.api').toggle.linewise.current()", desc = 'Toggle comment' }, + { + '/', + "lua require('Comment.api').toggle.linewise(vim.fn.visualmode())", + desc = 'Toggle comment', + mode = 'v', + }, + }, + opts = {}, + }, -- Todo Comments { diff --git a/lua/plugins/mini.lua b/lua/plugins/mini.lua index 778668d..fb4324f 100644 --- a/lua/plugins/mini.lua +++ b/lua/plugins/mini.lua @@ -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 = { diff --git a/lua/plugins/utility.lua b/lua/plugins/utility.lua index cb8494d..9498f51 100755 --- a/lua/plugins/utility.lua +++ b/lua/plugins/utility.lua @@ -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',