diff options
| author | Ravi R Kiran <aine.marina@gmail.com> | 2020-02-10 12:50:55 (GMT) |
|---|---|---|
| committer | Ravi R Kiran <aine.marina@gmail.com> | 2020-02-10 12:50:55 (GMT) |
| commit | 80d240f0036b0ed4a041f9c65bbe1e23cf344c11 (patch) | |
| tree | a3b31a62ebbf1d779c9301e9430055ca3d04889e /lisp/ravi-init-cpp.el | |
| parent | 41d2d77d5ddc73e6a9b98047d0a262232b876a76 (diff) | |
| download | dotemacs-80d240f0036b0ed4a041f9c65bbe1e23cf344c11.zip dotemacs-80d240f0036b0ed4a041f9c65bbe1e23cf344c11.tar.gz dotemacs-80d240f0036b0ed4a041f9c65bbe1e23cf344c11.tar.bz2 | |
Switch to posframe and pretty-hydra
Diffstat (limited to 'lisp/ravi-init-cpp.el')
| -rw-r--r-- | lisp/ravi-init-cpp.el | 129 |
1 files changed, 49 insertions, 80 deletions
diff --git a/lisp/ravi-init-cpp.el b/lisp/ravi-init-cpp.el index adb8098..ed124d8 100644 --- a/lisp/ravi-init-cpp.el +++ b/lisp/ravi-init-cpp.el @@ -103,82 +103,6 @@ (setq dummy-h-mode-default-major-mode 'c++-mode))) -;; Bind to f6 later; to do: pretty docstrings -(defhydra rtags-hydra (:color blue :hint nil) - " -^At point^ ^Location^ ^File^ ^Information -^^^^^^^^---------------------------------------------------------------- -_._: symbol _[_: back _p_: dependencies _D_: diagnostics -_,_: references _]_: forward _e_: reparse _S_: summary -_v_: virtuals _L_: copy _E_: preprocess _B_: rtags buffer -_V_: enum value _O_: to offset _C_: compile _h_: class hierarchy -_/_: all references _F_: fixit _I_: imenu _>_: find symbol -_G_: guess function _K_: member _T_: tag list _<_: find references -_X_: fix fixit _Z_: stack _;_: find file _R_: rename symbol -_M_: symbol info _A_: functions _a_: source args _P_: all deps -" - ("." rtags-find-symbol-at-point "find-symbol-at-point") - ("," rtags-find-references-at-point "find-references-at-point") - ("v" rtags-find-virtuals-at-point "find-virtuals-at-point") - ("V" rtags-print-enum-value-at-point "print-enum-value-at-point") - ("/" rtags-find-all-references-at-point "find-all-references-at-point") - ;; ("Y" rtags-cycle-overlays-on-screen "cycle-overlays-on-screen") - (">" rtags-find-symbol "find-symbol") - ("<" rtags-find-references "find-references") - ("[" rtags-location-stack-back "location-stack-back" :exit nil) - ("]" rtags-location-stack-forward "location-stack-forward" :exit nil) - ("Z" rtags-location-stack-visualize "location-stack-visualize") - ("D" rtags-diagnostics "diagnostics") - ("C" rtags-compile-file "compile-file") - ("G" rtags-guess-function-at-point "guess-function-at-point") - ("p" rtags-dependency-tree "dependency-tree") - ("P" rtags-dependency-tree-all "dependency-tree-all") - ("e" rtags-reparse-file "reparse-file") - ("E" rtags-preprocess-file "preprocess-file") - ("R" rtags-rename-symbol "rename-symbol") - ("M" rtags-symbol-info "symbol-info") - ("S" rtags-display-summary-as-message "display-summary") - ("O" rtags-goto-offset "goto-offset") - (";" rtags-find-file "find-file") - ("F" rtags-fixit "fixit") - ("L" rtags-copy-and-print-current-location "copy-and-print-current-location") - ("X" rtags-fix-fixit-at-point "fix-fixit-at-point") - ("B" rtags-show-rtags-buffer "show-rtags-buffer") - ("K" rtags-make-member "make-member") - ("A" rtags-find-functions-called-by-this-function "find-functions-called-by-this-function") - ("I" rtags-imenu "imenu") - ("T" rtags-taglist "taglist") - ("h" rtags-print-class-hierarchy "print-class-hierarchy") - ("a" rtags-print-source-arguments "print-source-arguments")) -(defhydra hydra-cextra (:color blue :hint nil) - " ------------------------------------------------------------------- -_i_: hide ifdef _C-i_: show _b_: hide/show _o_: other file -" - ("i" hide-ifdef-block "hide ifdef") - ("C-i" show-ifdef-block "show ifdef") - ("b" hs-toggle-hiding "hide/show block") - ("o" ff-find-other-file "other file")) -(defhydra cextra-rtags-hydra (:inherit - (hydra-cextra/heads rtags-hydra/heads) - :hint nil - :color blue) - " -^At point^ ^Location^ ^File^ ^Information -^^^^^^^^---------------------------------------------------------------- -_._: symbol _[_: back _p_: dependencies _D_: diagnostics -_,_: references _]_: forward _e_: reparse _S_: summary -_v_: virtuals _L_: copy _E_: preprocess _B_: rtags buffer -_V_: enum value _O_: to offset _C_: compile _h_: class hierarchy -_/_: all references _F_: fixit _I_: imenu _>_: find symbol -_G_: guess function _K_: member _T_: tag list _<_: find references -_X_: fix fixit _Z_: stack _;_: find file _R_: rename symbol -_M_: symbol info _A_: functions _a_: source args _P_: all deps -^^^^^^^------------------------------------------------------------------ -_i_: hide ifdef _C-i_: show _b_: hide/show _o_: other file -" - ) - (use-package cc-mode :mode (("\\.h\\(h\\|xx\\|pp\\)\\'" . c++-mode) @@ -569,10 +493,55 @@ this to 3 makes header-protection define KIG_MISC_NEWTYPE_H for a file named (setq hide-ifdef-initially nil) - (if (bound-and-true-p use-rtags-hydra) - (progn - (bind-key "<f6>" 'cextra-rtags-hydra/body c-mode-base-map)) - (bind-key "<f6>" 'hydra-cextra/body c-mode-base-map)) + (pretty-hydra-define ravi/hydra-cextra (:color blue :hint nil) + ("Hide" + (("i" hide-ifdef-block "hide ifdef") + ("C-i" show-ifdef-block "show ifdef") + ("b" hs-toggle-hiding "hide/show block") + ("o" ff-find-other-file "other file")))) + (when (bound-and-true-p use-rtags-hydra) + (pretty-hydra-define+ ravi/hydra-cextra () + ("At point" + (("." rtags-find-symbol-at-point "symbol") + ("," rtags-find-references-at-point "references") + ("v" rtags-find-virtuals-at-point "virtuals") + ("V" rtags-print-enum-value-at-point "enum value") + ("/" rtags-find-all-references-at-point "all references") + ("G" rtags-guess-function-at-point "guess function") + ("X" rtags-fix-fixit-at-point "fix fixit") + ("M" rtags-symbol-info "symbol info")) + + "Location" + (("[" rtags-location-stack-back "back" :exit nil) + ("]" rtags-location-stack-forward "forward" :exit nil) + ("L" rtags-copy-and-print-current-location "copy") + ("O" rtags-goto-offset "to offset") + ("F" rtags-fixit "fixit") + ("K" rtags-make-member "member") + ("Z" rtags-location-stack-visualize "stach") + ("A" rtags-find-functions-called-by-this-function "functions")) + + "File" + (("p" rtags-dependency-tree "dependencies") + ("e" rtags-reparse-file "reparse") + ("E" rtags-preprocess-file "preprocess") + ("C" rtags-compile-file "compile") + ("I" rtags-imenu "imenu") + ("T" rtags-taglist "tag list") + (";" rtags-find-file "find file") + ("a" rtags-print-source-arguments "source args")) + + "Information" + (("D" rtags-diagnostics "diagnostics") + ("S" rtags-display-summary-as-message "summary") + ("B" rtags-show-rtags-buffer "rtags buffer") + ("h" rtags-print-class-hierarchy "class hierarchy") + (">" rtags-find-symbol "find symbol") + ("<" rtags-find-references "find references") + ("R" rtags-rename-symbol "rename symbol") + ("P" rtags-dependency-tree-all "all deps")) + )) + (bind-key "<f6>" 'ravi/hydra-cextra/body c-mode-base-map)) (bind-key "<M-f8>" 'compile-dwim c-mode-base-map) (use-package multi-compile |
