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(diagnostic): respect "if_many" source option for virtual text #16653

Merged
merged 1 commit into from Dec 18, 2021

Conversation

gpanders
Copy link
Member

@gpanders gpanders commented Dec 14, 2021

The prefix_source function only evaluates the sources from the
diagnostics passed to it; however, because each namespace draws its own
virtual text, its diagnostics will never contain more than a single
source (by definition). This requires changing the semantics of what
"if_many" means from "multiple sources in a single 'batch' of
diagnostics" to "multiple sources of all diagnostics within a buffer".

Closes #16644.

@gpanders gpanders force-pushed the diag-virt-text-source branch 6 times, most recently from 7955b9d to 420020c Compare December 16, 2021 15:16
The `prefix_source` function only evaluates the sources from the
diagnostics passed to it; however, because each namespace draws its own
virtual text, its diagnostics will never contain more than a single
source (by definition). This requires changing the semantics of what
"if_many" means from "multiple sources in a single 'batch' of
diagnostics" to "multiple sources of all diagnostics within a buffer".
@github-actions
Copy link
Contributor

Successfully created backport PR #16697 for release-0.6.

zeertzjq pushed a commit to zeertzjq/neovim that referenced this pull request Dec 18, 2021
…ovim#16653)

The `prefix_source` function only evaluates the sources from the
diagnostics passed to it; however, because each namespace draws its own
virtual text, its diagnostics will never contain more than a single
source (by definition). This requires changing the semantics of what
"if_many" means from "multiple sources in a single 'batch' of
diagnostics" to "multiple sources of all diagnostics within a buffer".
@zeertzjq zeertzjq added this to the 0.6.1 milestone Dec 21, 2021
@zeertzjq zeertzjq modified the milestones: 0.6.2, 0.6.1 Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vim.diagnostic opt source = "if_many" doesn't work for virtual_text
2 participants