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: Optimize counting of diagnostics with new `vim.diagnostic.count()` (nvim 0.10+) #1239

Open camoz opened 1 month ago

camoz commented 1 month ago

Requested feature

Optimize counting of diagnostics with new function [vim.diagnostic.count()](https://neovim.io/doc/user/diagnostic.html#vim.diagnostic.count()) (nvim 0.10+) where possible.

This is more efficient and thus preferred over using vim.diagnostic.get() for counting diagnostics manually (as it is currently done in lualine), according to https://neovim.io/doc/user/news-0.10.html

Motivation

Performance improvement.