32 lines
753 B
Lua
32 lines
753 B
Lua
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,
|
|
}
|