1
0
Fork 0

Add refactoring hydra to oni-java

This commit is contained in:
Tom Willemse 2019-06-23 09:33:15 -07:00
parent e584d92941
commit 799566eb32

View file

@ -4,8 +4,8 @@
;; Author: Tom Willemse <tom@ryuslash.org> ;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local ;; Keywords: local
;; Version: 20190611081136 ;; Version: 20190623093216
;; Package-Requires: (oni-fci oni-data-dir lsp-java company-lsp lsp-ui) ;; 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 ;; 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 ;; it under the terms of the GNU General Public License as published by
@ -26,6 +26,7 @@
;;; Code: ;;; Code:
(require 'hydra)
(require 'lsp-java) (require 'lsp-java)
(require 'oni-data-dir) (require 'oni-data-dir)
@ -37,6 +38,9 @@
"Set `comment-auto-fill-only-comments' to true locally." "Set `comment-auto-fill-only-comments' to true locally."
(setq-local comment-auto-fill-only-comments t)) (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 (setq lsp-java-server-install-dir
(oni-data-dir-locate "lsp-java/server/")) (oni-data-dir-locate "lsp-java/server/"))
@ -56,6 +60,8 @@
(add-to-list 'company-backends 'company-lsp) (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)) ;;;###autoload(with-eval-after-load 'cc-mode (require 'oni-java))
(provide 'oni-java) (provide 'oni-java)