diff --git a/.config/nvim/lua/kamu/plugins/comments.lua b/.config/nvim/lua/kamu/plugins/comments.lua new file mode 100644 index 0000000..fb29b93 --- /dev/null +++ b/.config/nvim/lua/kamu/plugins/comments.lua @@ -0,0 +1,31 @@ +return { + 'numToStr/Comment.nvim', + opts = { + -- add any options here + }, + config = function() + + -- vim.bo.commentstring = '//%s' + -- vim.api.nvim_command('set commentstring=//%s') + + -- or + + -- local ft = require('Comment.ft') + -- -- 1. Using set function + -- ft + -- -- Set only line comment + -- .set('yaml', '#%s') + -- -- Or set both line and block commentstring + -- .set('javascript', {'//%s', '/*%s*/'}) + + -- -- 2. Metatable magic + + -- ft.javascript = {'//%s', '/*%s*/'} + -- ft.yaml = '#%s' + + -- -- Multiple filetypes + -- ft({'go', 'rust'}, ft.get('c')) + -- ft({'toml', 'graphql'}, '#%s') + end, + lazy = false, +} diff --git a/.config/nvim/lua/kamu/plugins/vim-commentary.lua b/.config/nvim/lua/kamu/plugins/vim-commentary.lua deleted file mode 100644 index dad197f..0000000 --- a/.config/nvim/lua/kamu/plugins/vim-commentary.lua +++ /dev/null @@ -1,4 +0,0 @@ -return { - 'tpope/vim-commentary', - event = 'VeryLazy', -}