diff options
author | Evgeni Chasnovski <evgeni.chasnovski@gmail.com> | 2024-01-01 23:03:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-01 15:03:50 -0600 |
commit | 4ee656e4f35766bef4e27c5afbfa8e3d8d74a76c (patch) | |
tree | c4ed1797aae35f7b824e142b7402215457da34a7 /runtime/lua/vim/lsp/rpc.lua | |
parent | 164f1ea06d17e935f41e178e46bb05bbb676af20 (diff) | |
download | rneovim-4ee656e4f35766bef4e27c5afbfa8e3d8d74a76c.tar.gz rneovim-4ee656e4f35766bef4e27c5afbfa8e3d8d74a76c.tar.bz2 rneovim-4ee656e4f35766bef4e27c5afbfa8e3d8d74a76c.zip |
feature(diagnostic): add `vim.diagnostic.count()` (#26807)
feat(diagnostic): add `vim.diagnostic.count()`
Problem: Getting diagnostic count based on the output of
`vim.diagnostic.get()` might become costly as number of diagnostic
entries grows. This is because it returns a copy of diagnostic cache
entries (so as to not allow users to change them in place).
Getting information about diagnostic count is frequently used in
statusline, so it is important to be as fast as reasonbly possible.
Solution: Add `vim.diagnostic.count()` which computes severity
counts without making copies.
Diffstat (limited to 'runtime/lua/vim/lsp/rpc.lua')
0 files changed, 0 insertions, 0 deletions