nvim-config/lua/configs/comment.lua

24 lines
421 B
Lua
Raw Normal View History

2022-02-28 14:41:22 +00:00
local M = {}
function M.config()
2023-01-10 18:21:09 +00:00
local status_ok, comment = pcall(require, 'Comment')
2022-02-28 14:41:22 +00:00
if not status_ok then
return
end
2023-01-10 18:21:09 +00:00
comment.setup({
pre_hook = require('ts_context_commentstring.integrations.comment_nvim').create_pre_hook(),
padding = true,
sticky = true,
ignore = '^$', -- Don't comment empty lines
toggler = {
line = '<leader>/',
},
opleader = {
line = '<leader>/',
},
})
2022-02-28 14:41:22 +00:00
end
return M