A minor mode for Emacs that displays the latest available version of Rust crates as virtual text in Cargo.toml files.
Clone the repository and add to your load-path:
(add-to-list 'load-path "/path/to/crates.el")
(require 'crates)
(add-hook 'find-file-hook (lambda () (when (string= (file-name-nondirectory buffer-file-name) "Cargo.toml") (crates-mode))))Add to your packages.el
(package! crates :recipe (:host github :repo "shadr/crates.el"))Add in your config.el
(use-package! crates
:config
(add-hook! 'find-file-hook (when (string= (file-name-nondirectory buffer-file-name) "Cargo.toml") (crates-mode))))Note: when testing I couldn't always attach to the find-file-hook, solution was to switch to conf-toml-mode-hook or toml-ts-mode-hook
(straight-use-package
'(crates :type git :host github :repo "shadr/crates.el"))Contributions are welcome! Please feel free to submit issues and pull requests.
This package is licensed under the GNU General Public License v3.0 or later. See LICENSE for details.
- Inspired by crates.nvim for Neovim
