Allows you to use trouble diagnostic counts on your status line. This is best used when you are running a filter on trouble diagnostics. For example, I only want to see workspace diagnostics and counts.
This is my first time writing lua code and contributing to a neovim plugin. Please be kind but brutal with feedback so that I can improve my solution and learn.
I duplicated a bunch of code in api.lua from function M.statusline(opts). There is probably a way to share most of that code between it and function M.diagnosticsCount(opts).
I would also eventually like to support trouble as a diagnostic source in lualine. I am not sure how to accomplish this. It is also a little more complicated than the others as you would want to specify the mode and/or filter. If anyone has any ideas on this that would be great.
Allows you to use trouble diagnostic counts on your status line. This is best used when you are running a filter on trouble diagnostics. For example, I only want to see workspace diagnostics and counts.
This is my first time writing lua code and contributing to a neovim plugin. Please be kind but brutal with feedback so that I can improve my solution and learn.
I duplicated a bunch of code in api.lua from
function M.statusline(opts)
. There is probably a way to share most of that code between it andfunction M.diagnosticsCount(opts)
.I would also eventually like to support trouble as a diagnostic source in lualine. I am not sure how to accomplish this. It is also a little more complicated than the others as you would want to specify the mode and/or filter. If anyone has any ideas on this that would be great.