Skip to content

Fix(diagnostics) not showing when severity_sort is disabled #1532

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

Merged
merged 1 commit into from
Mar 26, 2025

Conversation

0xDmtri
Copy link
Contributor

@0xDmtri 0xDmtri commented Mar 26, 2025

Problem:
Diagnostics were not being displayed when the severity_sort option was not enabled in vim.diagnostic.config(). This issue occurred because the generate_list function only called the callback when severity_sort was set to true, leaving the diagnostics unprocessed in the opposite case.

Solution:
The generate_list function has been modified to always call the callback with the generated list, regardless of whether severity_sort is enabled. This ensures that diagnostics are displayed correctly in all scenarios. Additionally, unnecessary return statements were removed since the caller does not use the return value, simplifying the code.
This fix provides a consistent user experience by ensuring diagnostics work as expected, whether sorting by severity is enabled or not.

Fixes #1520

@glepnir glepnir merged commit 4b0f0e2 into nvimdev:main Mar 26, 2025
2 of 4 checks passed
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.

Lspsaga show_line_diagnostics broken after latest update.
2 participants