Skip to content

Commit fc59cd4

Browse files
committed
add notice about keybindings + example using transient.el
1 parent f5df770 commit fc59cd4

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

README.org

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,40 @@ Alternatively, you can install Phpactor on your own and configure `phpactor-exec
4848
*** phpactor itself
4949
See https://phpactor.github.io/phpactor/configuration.html
5050

51+
*** keybindings
52+
53+
Phpactor.el doesn't bring any keybindings and it's up to you to configure them as you wish.
54+
55+
You could for example limit yourself to only one by using [[https://github.com/magit/transient][transient.el]] like this
56+
57+
#+BEGIN_SRC elisp
58+
(define-transient-command php-transient-menu ()
59+
"Php"
60+
[["Class"
61+
("cc" "Copy" phpactor-copy-class)
62+
("cn" "New" phpactor-create-new-class)
63+
("cr" "Move" phpactor-move-class)
64+
("ci" "Inflect" phpactor-inflect-class)
65+
("n" "Namespace" phpactor-fix-namespace)]
66+
["Properties"
67+
("a" "Accessor" phpactor-generate-accessors)
68+
("pc" "Constructor" phpactor-complete-constructor)
69+
("pm" "Add missing props" phpactor-complete-properties)
70+
("C" "Extract const" phpactor-extract-constant)
71+
("r" "Rename var locally" phpactor-rename-variable-local)
72+
("R" "Rename var in file" phpactor-rename-variable-file)]
73+
["Methods"
74+
("i" "Implement Contracts" phpactor-implement-contracts)
75+
("m" "Generate method" phpactor-generate-method)]
76+
["Navigate"
77+
("x" "List refs" phpactor-list-references)
78+
("X" "Replace refs" phpactor-replace-references)
79+
("." "Goto def" phpactor-goto-definition)]
80+
["Phpactor"
81+
("s" "Status" phpactor-status)
82+
("u" "Install" phpactor-install-or-update)]])
83+
#+END_SRC
84+
5185
** Troubleshooting
5286

5387
You can run ``phpactor-status`` while visiting a project file.

0 commit comments

Comments
 (0)