nvim-lualine / lualine.nvim

A blazing fast and easy to configure neovim statusline plugin written in pure lua.
MIT License
5.71k stars 455 forks source link

feat: add whitespace component #1218

Open 9ary opened 3 months ago

9ary commented 3 months ago

This is more or less a port of airline's extension, so I retained their copyright line and a link to the source for attribution.

Compared to the snippets on the wiki, this has extra checks (overlong lines, merge conflict markers), and it caches the result, invalidating on CursorHold or write when the buffer's been modified. It also disables some or all checks in some conditions for performance and sanity reasons.

Compared to airline, the code is hopefully easier to read. The mixed-indent file check only ever runs one search based on the value of expandtab.