add word count to lualine

This commit is contained in:
andrzej 2024-11-08 22:02:25 +01:00
parent 609f11ab7d
commit d95f9c969d
1 changed files with 6 additions and 2 deletions

View File

@ -3,6 +3,7 @@ return {
dependencies = { dependencies = {
"nvim-tree/nvim-web-devicons", "nvim-tree/nvim-web-devicons",
config = function() config = function()
local prose = require("nvim-prose")
require("lualine").setup({ require("lualine").setup({
options = { options = {
icons_enabled = true, icons_enabled = true,
@ -26,8 +27,11 @@ return {
lualine_a = { "mode", "vim.g.cmptoggle and 'cmp'", "branch" }, lualine_a = { "mode", "vim.g.cmptoggle and 'cmp'", "branch" },
lualine_b = { "vim.g.cwdShortened", "diff", "diagnostics" }, lualine_b = { "vim.g.cwdShortened", "diff", "diagnostics" },
lualine_c = { "filename" }, lualine_c = { "filename" },
lualine_x = {}, lualine_x = {
lualine_y = { "filetype" }, { prose.word_count, cond = prose.is_available },
{ prose.reading_time, cond = prose.is_available },
},
lualine_y = { "vim.b.word_count", "filetype" },
lualine_z = { lualine_z = {
--"vim.g.cwdShortened" --"vim.g.cwdShortened"
-- "datetime", -- "datetime",