Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

crates.el

License

A minor mode for Emacs that displays the latest available version of Rust crates as virtual text in Cargo.toml files.

Screenshot of a Cargo.toml buffer with latest crates version visible as a virtual text.

Installation

Manual Installation

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))))

Doom Emacs

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

Using straight.el

(straight-use-package
 '(crates :type git :host github :repo "shadr/crates.el"))

Contributing

Contributions are welcome! Please feel free to submit issues and pull requests.

License

This package is licensed under the GNU General Public License v3.0 or later. See LICENSE for details.

Acknowledgments

About

An Emacs minor mode for Cargo.toml files that displays latest crates version, inspired by crates.nvim

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages