At the moment, local docs are not updated when running rust-analyzer.openDocs, which can result in unintentionally reading outdated documentation.
I suggest to provide a way of automatically building docs before opening them.
The simplest approach, which I use right now, is to just use an editor shortcut which runs cargo doc before requesting opening docs. (<cmd>!cargo doc<cr><cmd>CocCommand rust-analyzer.openDocs<cr>)
Alternatively, this functionality could be integrated into coc-rust-analyzer (possibly configurable), but this might be unnecessarily complicated.
In case the code is kept the way it is, I think it would be good to add a note in the documentation of the rust-analyzer.openDocs command indicating that local docs are not updated, and adding a hint that updated can be achieved by running cargo doc in the same shortcut used for opening docs.
At the moment, local docs are not updated when running
rust-analyzer.openDocs
, which can result in unintentionally reading outdated documentation.I suggest to provide a way of automatically building docs before opening them.
The simplest approach, which I use right now, is to just use an editor shortcut which runs
cargo doc
before requesting opening docs. (<cmd>!cargo doc<cr><cmd>CocCommand rust-analyzer.openDocs<cr>
)Alternatively, this functionality could be integrated into coc-rust-analyzer (possibly configurable), but this might be unnecessarily complicated.
In case the code is kept the way it is, I think it would be good to add a note in the documentation of the
rust-analyzer.openDocs
command indicating that local docs are not updated, and adding a hint that updated can be achieved by runningcargo doc
in the same shortcut used for opening docs.