2017-06-08 11:47:56 +02:00
|
|
|
;;; lang/rust/autoload.el -*- lexical-binding: t; -*-
|
2017-02-21 03:46:07 -05:00
|
|
|
|
2017-04-07 01:45:57 -04:00
|
|
|
;; TODO (defun +rust/run-cargo () (interactive))
|
|
|
|
|
2017-10-03 02:49:08 +02:00
|
|
|
;;;###autoload
|
|
|
|
(defun +rust-cargo-project-p ()
|
|
|
|
"Return t if this is a cargo project."
|
2018-03-14 18:44:55 -04:00
|
|
|
(locate-dominating-file buffer-file-name "Cargo.toml"))
|
2019-04-10 18:51:37 -04:00
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun +rust-cargo-compile (command)
|
|
|
|
"TODO"
|
|
|
|
(let ((default-directory (+rust-cargo-project-p)))
|
|
|
|
(compile command)))
|
2019-04-30 20:19:13 -04:00
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun +rust-racer-lookup-documentation (identifier)
|
|
|
|
"A `+lookup/documentation' handler for Rust + Racer."
|
|
|
|
(let ((buf (racer--describe identifier)))
|
|
|
|
(when buf
|
|
|
|
(pop-to-buffer buf)
|
|
|
|
t)))
|