-- ~/.config/nvim/lua/user/comment.lua
local status_ok, comment = pcall(require, "Comment")
if not status_ok then
	vim.notify("Comment.nvim not found!")
	return
end

require("Comment").setup({
	toggler = {
		line = "<leader>k",
		block = "<leader>b",
	},
	opleader = {
		line = "<leader>k",
		block = "<leader>b",
	},
	-- Bypass Comment.nvim's treesitter path (broken on Neovim 0.12+)
	-- and use Neovim's native commentstring instead (set correctly per filetype)
	pre_hook = function()
		return vim.bo.commentstring
	end,
})
