Skip to content
This repository has been archived by the owner on Dec 28, 2022. It is now read-only.

Latest commit

 

History

History
50 lines (36 loc) · 2.88 KB

README.md

File metadata and controls

50 lines (36 loc) · 2.88 KB

Rustdoc has moved!

Rustdoc now comes with rustic, and future development will happen in that repo. Join us there!

In rustic, this feature goes under the name rustic-doc: https://github.com/brotzeit/rustic#rust-docs-in-org-mode

Rustdoc to org

A Pandoc filter that converts rust documentation to .org-files, and a minor mode to go with! Demo with helm ag

Installation

Installation is somewhat annoying at the moment. However, most of these should not be too painful to setup.

Prequisites

The package

Rustdoc is not on melpa, but you can install it from here with your package manager of choice or manually. Please make an issue if something stops working, as rustdoc is currently changing rapidly.

Usage

  • Enable rustdoc-mode.
  • Run M-x rustdoc-setup to download files that rustdoc needs to convert rust documentation and also convert std.
  • You can now convert package-specific documentation with M-x rustdoc-convert-current-package
  • Search the org files with rustdoc-search (bound to C-# by default) if you are in Rust mode, Rustic mode or Org mode. If you hover over a symbol when you invoke the command, rustdoc-search will insert a default value.
  • Add universal argument to only search for level 1 headers like struct or enum names.

Notes

  • We are waiting for an update to Pandoc that will make the generated documents prettier, it should be available soon jgm/pandoc#6554
  • You should re-run rustdoc-setup once in a while, to update the pandoc filter.
  • If rustdoc does not find the documentation for something, the first thing to do is check the project's target/doc folder for the corresponding .html-file. If there is no file there, there is nothing for rustdoc to convert. If there is a file there, please create an issue!

TODO

  • Figure out a way to get links working. All links point to .html files, they should be updated to point to .org files.
  • Make code not awful and not slow.
  • Fill out this list.

All suggestions, comments, bug reports, PRs etc are very welcomed!