Closed MunifTanjim closed 2 years ago
local nut = { buf = { wordcount = require("nougat.nut.buf.wordcount").create, }, } local wordcount_enabled = { markdown = true, } statusline:add_item(nut.buf.wordcount({ hidden = function(_, ctx) return not wordcount_enabled[vim.bo[ctx.bufnr].filetype] end, hl = { bg = "darksalmon", fg = "bg" }, prefix = " ", suffix = " ", sep_right = sep.right_chevron_solid(true), config = { format = function(count) return string.format("%d %s", count, count > 1 and " Words" or " Word") end, }, }))