-
Notifications
You must be signed in to change notification settings - Fork 787
Linter: buf
: Diagnostics are often behind and need a manual :e
to refresh diagnostics
#863
Comments
This most likely indicates that the source doesn't actually accept |
This problem affects not just diagnostics, but also formatting with buf. |
I suspect the root cause is the same - Edit: I found this issue on the repository that clarifies that |
This is what ale is doing. They have way more people working on their linter integration, and still decided to lint only when saving. We should just do the same. One day buf will hopefully add proper stdin support. Then we can switch back to continuous linting. The only remaining question is how to fix the formatter. Especially since we want to support range-based formatting. I don't see any practical solution other than waiting for buf's stdin support. Otherwise it would take a lot of extra logic just for one singe formatter. |
Makes sense to me, let’s try running the linter on save and see how that works (it should be a one-line change). I think it’s worth trying the formatted with a temp file, too - it’s another simple change and should work if no additional context is needed to format (which is what the linked issue implies). |
Just push the fix for buf diagnostics. There is nothing to "try out" here. The current situation is already broken and a fix can't make it possibly worse. |
You seem to have an entitlement issue - all you’ve done is complain about how things don’t work the way you expect, and if you can’t even be bothered to put in a PR to fix this, then I don’t think there’s any reason to continue this conversation. |
FAQ
Issues
Neovim Version
0.7.0
Operating System
Fedora 35
Minimal config
Only change to the provided minimal config:
Steps to reproduce
nvim --clean -u minimal_init.lua
foo.proto
. This should display a warningsyntax = "proto3";
syntax = "proto1298129";
Expected behavior
Diagnostics are not lagging behind and work just as great as other linters, e.g. shellcheck.
Actual behavior
Diagnostics are often behind. Only workaround is to reload the file via
:e
, or to enter and leave insert mode a few times to force a refresh.Debug log
Help
No
Implementation help
No response
Requirements
The text was updated successfully, but these errors were encountered: