-- Wordcount in markdown -- -- Credits -- https://github.com/nvim-lualine/lualine.nvim/issues/328#issuecomment-982672253 -- https://github.com/skwee357/nvim-prose local M = {} function M.wordcount() local wc = vim.fn.wordcount() if not (wc.visual_words == nil) then return tostring(wc.visual_words) .. " words" end return tostring(wc.words) .. " words" end function M.is_available() if vim.bo.filetype == "markdown" then return true end return false end return M