Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deprecated vim.lsp.diagnostic.get_count call #226

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

CHNB128
Copy link

@CHNB128 CHNB128 commented Jan 14, 2022

No description provided.

@CHNB128 CHNB128 force-pushed the main branch 3 times, most recently from 1e1a6bc to bc079ff Compare January 14, 2022 08:31
count = count + lsp.diagnostic.get_count(api.nvim_get_current_buf(),diag_type,client.id)
local opts = { severity = diag_type }
opts.namespace = vim.diagnostic.get_namespace(client.id)
count = count + vim.diagnostic.get(api.nvim_get_current_buf(),opts)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This patch gives arithmetic errors when displaying the diagnostics at the galaxystatus line.

I may be wrong, but aren't you here adding a scalar count to a table from vim.diagnostic.get().

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've fixed this in my fork if you're interested.
https://github.com/justinhj/galaxyline.nvim/blob/main/README.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants