lang/rust: fix documentation lookup handler #1374
This commit is contained in:
parent
6bd6c1623b
commit
f20f477a44
2 changed files with 11 additions and 3 deletions
|
@ -12,3 +12,11 @@
|
||||||
"TODO"
|
"TODO"
|
||||||
(let ((default-directory (+rust-cargo-project-p)))
|
(let ((default-directory (+rust-cargo-project-p)))
|
||||||
(compile command)))
|
(compile command)))
|
||||||
|
|
||||||
|
;;;###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)))
|
||||||
|
|
|
@ -21,9 +21,9 @@
|
||||||
:after rust-mode
|
:after rust-mode
|
||||||
:config
|
:config
|
||||||
(add-hook 'rust-mode-hook #'racer-mode)
|
(add-hook 'rust-mode-hook #'racer-mode)
|
||||||
(set-lookup-handlers! 'rust-mode :async t
|
(set-lookup-handlers! 'rust-mode
|
||||||
:definition #'racer-find-definition
|
:definition '(racer-find-definition :async t)
|
||||||
:documentation #'racer-describe))
|
:documentation '+rust-racer-lookup-documentation))
|
||||||
|
|
||||||
|
|
||||||
(def-package! flycheck-rust
|
(def-package! flycheck-rust
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue