/open-browser-rustdoc.vim

vim plugin to open current corresponding rustdoc in a new tab of your default browser

Primary LanguageVim ScriptBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

open-browser-rustdoc.vim

About

Opens Rustdoc URL for current crate, standard library, etc. from Vim.

Install

This plugin requires:

Use your favorite plugin manager to install this plugin and all its lua dependencies.

Expand lazy.nvim snippet:
{
    "rogercoll/open-browser-rustdoc.vim",
    dependencies = {
        "tyru/open-browser.vim", -- Required
    },
    lazy = false,
}

Usage

There are 2 commands.

:OpenRustDocCrate

Opens a specific crate documentation in docs.rs.

" Opens anyhow latest crate's documentation in docs.rs.
:OpenRustDocCrate anyhow
" Opens anyhow version 1.0.0 crate's documentation in docs.rs.
:OpenRustDocCrate anyhow 1.0.0

:OpenRustDocStd

Opens Rust standard library in doc.rust-lang.org/std/.

:OpenRustDocStd

:OpenRustDocReleases

Opens https://releases.rs/docs/.

:OpenRustDocReleases

WIP

:OpenRustDoc

Opens the underlying Rust module in docs.rs.

Tracking issue: #1

TODO

  • [] Open any arbitrary Rust data structure documentation.