From 799566eb326628b2af9a5aff6f06d1b33c75a142 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Sun, 23 Jun 2019 09:33:15 -0700 Subject: [PATCH] Add refactoring hydra to oni-java --- oni-java.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/oni-java.el b/oni-java.el index 73a254a..eaf6e20 100644 --- a/oni-java.el +++ b/oni-java.el @@ -4,8 +4,8 @@ ;; Author: Tom Willemse ;; Keywords: local -;; Version: 20190611081136 -;; Package-Requires: (oni-fci oni-data-dir lsp-java company-lsp lsp-ui) +;; Version: 20190623093216 +;; Package-Requires: (oni-fci oni-data-dir lsp-java company-lsp lsp-ui hydra) ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -26,6 +26,7 @@ ;;; Code: +(require 'hydra) (require 'lsp-java) (require 'oni-data-dir) @@ -37,6 +38,9 @@ "Set `comment-auto-fill-only-comments' to true locally." (setq-local comment-auto-fill-only-comments t)) +(defhydra java-refactor-hydra (:color blue) + ("r" lsp-rename "Rename object")) + (setq lsp-java-server-install-dir (oni-data-dir-locate "lsp-java/server/")) @@ -56,6 +60,8 @@ (add-to-list 'company-backends 'company-lsp) +(define-key java-mode-map (kbd "C-c r") 'java-refactor-hydra/body) + ;;;###autoload(with-eval-after-load 'cc-mode (require 'oni-java)) (provide 'oni-java)