Skip to content

Error using build-in neovim diagnostics #19

Closed
@ner0-m

Description

@ner0-m

As neovim/neovim#12655 was merged and using neovim with it, I get the following:

Error detected while processing function LspStatus:
line 2:
buf_diagnostics_count is deprecated. Use 'vim.lsp.diagnostic.get_count'

With my function to update the statusline being:

function! LspStatus() abort
  if luaeval('#vim.lsp.buf_get_clients() > 0')
    return luaeval("require('lsp-status').status()")
  endif
  return ''
endfunction

The error seems to be in lsp-status/diagnostics.lua:11 Changing it to:

result[k] = vim.lsp.diagnostic.get_count(level)

fixes my error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions