Open chedieck opened 2 years ago
Same here. Adding a dependency breaks ALE, causing it to show errors where there are none. Restarting vim fixes it.
Not a permanent fix but my usual workaround to this is, :ALEStopAllLSPs
, then :ALEDisable
, then :ALEEnable
. Can be run on any Rust buffer.
EDIT: Just noticed that it also affects rustc and cargo; for those, I think ALEDisable and ALEEnable might fix it?
How about please renaming this issue from:
Using ~rust linters~ with ALE only considers the Cargo.toml file at the moment the vim process started.
to
Using cargo linter with ALE only considers the Cargo.toml file at the moment the vim process started.
It is clear from the error message that the flag --frozen
is given to cargo check
. Frankly, that seems reasonable to me. My recommendation for anyone wanting reactions to toml file updates is to use rust-analyzer rather than the way more limited cargo linter.
A year and a half later, could you @chedieck please rename this issue as suggested in my previous post, or perhaps elaborate on why you wish to keep the title overly broad?
Information
VIM version
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Feb 24 2022 18:41:57)
Correções incluídas: 1-4464
Operating System: Linux ultrarobson 5.16.16-arch1-1 #1 SMP PREEMPT Mon, 21 Mar 2022 22:59:40 +0000 x86_64 GNU/Linux
What went wrong
Using rust linters with ALE only considers the
Cargo.toml
file at the moment the vim process started.Reproducing the bug
Using any of the linters
'rustc'
or'cargo'
, I get the following problem:main.rs
fileuse nix::unistd::alarm;
into the file begginingnix
Cargo.toml
file and add under[dependencies]
the linenix = "0.23.1"
That is: once the rust linter has ran at least once, it will not "see" any updates that occur to the
Cargo.toml
file in the subsequential lintings.Mannually running
:ALEStopAllLSPs
solves the issue.:ALEInfo when using
cargo
:ALEInfo when using
rustc