Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@haoqixu
Copy link
Contributor

@haoqixu haoqixu commented Aug 23, 2023

In some cases, linters may produce unrelated diagnostics for the buffer. For example, when enabling g:ale_go_golangci_lint_package, the whole Go package will be checked instead of only the current file.

If g:ale_use_neovim_diagnostics_api is enabled, we will see unrelated diagnostics belonging to other files/buffers.

This PR filters out the unrelated diagnostics before calling the vim.diagnostic.set api.

Copy link
Member

@w0rp w0rp left a comment

Choose a reason for hiding this comment

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

Looks pretty good. Just one comment.

@haoqixu haoqixu requested a review from w0rp August 23, 2023 08:04
@w0rp w0rp merged commit ea27441 into dense-analysis:master Sep 5, 2023
@w0rp
Copy link
Member

w0rp commented Sep 5, 2023

Cheers! 🍻

mnikulin pushed a commit to mnikulin/ale that referenced this pull request Nov 12, 2023
Fix the NeoVim diagnostics bridge so it only sends over diagnostics relevant to the current buffer.
cyyever pushed a commit to cyyever/ale that referenced this pull request Mar 24, 2025
Fix the NeoVim diagnostics bridge so it only sends over diagnostics relevant to the current buffer.
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.

2 participants