NeoVim plugin for visualising sentence length

One minute read
I used AI to generate the code for this plugin.

I am trying to get better at writing. One of the recommendations I’ve read is that varying the sentence length makes reading more enjoyable. Naturally, I wanted to visualise this while writing. Coloring each sentence according to its length, would make it possible to detect long blocks of same-length sentences; they would be large uniformly colored blobs. Optionally also show the lengths in a sidebar column.

Since I use NeoVim for all of my writing, a Lua plugin would do just fine. So I made one.

Here is how it looks like, when ran on the source code for this very post:

Screenshot of vim-prose-flow