diff options
| author | mgmarlow <graham@mgmarlow.com> | 2023-06-20 17:25:43 -0700 |
|---|---|---|
| committer | mgmarlow <graham@mgmarlow.com> | 2023-06-20 17:25:43 -0700 |
| commit | 0fd4835b8753210b4d0eaa8b8c238edf2a4d01c7 (patch) | |
| tree | 71b10e1d1c516c8f4f4a73ae8cf761323894b0b5 | |
| parent | 352383f63419159148792bd484778287a70cdaec (diff) | |
| download | flymake-clippy-0fd4835b8753210b4d0eaa8b8c238edf2a4d01c7.tar.gz | |
Documentation updates
| -rw-r--r-- | README.md | 14 | ||||
| -rw-r--r-- | clippy-flymake.el | 8 |
2 files changed, 16 insertions, 6 deletions
@@ -12,7 +12,7 @@ Use with [rust-mode](https://elpa.nongnu.org/nongnu/rust-mode.html): :hook (rust-mode . clippy-flymake-setup-backend)) ``` -## Eglot users +### Eglot users Eglot [fully manages Flymake](https://github.com/joaotavora/eglot/issues/268) so you'll need some extra code to make it cooperate: @@ -50,5 +50,15 @@ Eglot [fully manages Flymake](https://github.com/joaotavora/eglot/issues/268) so You can confirm that Flymake is running correctly by opening up a Rust buffer and examining `flymake-running-backends': ``` -Running backends: clippy-flymake, eglot-flymake-backend +Running backends: clippy-flymake-backend, eglot-flymake-backend ``` + +## Contributing + +Please contribute improvements via email to [the mailing list](https://lists.sr.ht/~mgmarlow/public-inbox) using [git send-email](https://git-send-email.io/). When posting patches, edit the `[PATCH]` line to include `clippy-flymake`: + +``` +[PATCH clippy-flymake] Add thing to stuff +``` + +Learn more about contributing via email from [Sourcehut's documentation](https://man.sr.ht/lists.sr.ht/etiquette.md). diff --git a/clippy-flymake.el b/clippy-flymake.el index 15680a3..ecfeb0d 100644 --- a/clippy-flymake.el +++ b/clippy-flymake.el @@ -58,9 +58,9 @@ (defvar-local clippy-flymake--proc nil "Clippy subprocess object, used to ensure obsolete processes aren't reused.") -(defun clippy-flymake--check-buffer (report-fn &rest _args) - "Flymake backend for cargo clippy. REPORT-FN is passed in via -`flymake-diagnostic-functions' hook. +(defun clippy-flymake-backend (report-fn &rest _args) + "Flymake backend for Clippy, the Rust linter. Calls REPORT-FN with a +list of Flymake diagnostics for the current buffer. Use `clippy-flymake-setup-backend' to register the backend with the appropriate Flymake hook." @@ -109,7 +109,7 @@ with the appropriate Flymake hook." (defun clippy-flymake-setup-backend () "Add `clippy-flymake' to `flymake-diagnostic-functions' hook." - (add-hook 'flymake-diagnostic-functions #'clippy-flymake--check-buffer nil t)) + (add-hook 'flymake-diagnostic-functions #'clippy-flymake-backend nil t)) (provide 'clippy-flymake) ;;; clippy-flymake.el ends here |
