Skip to content

Build updated local docs before opening them #1263

@danielrainer

Description

@danielrainer

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions