Skip to content

change mini-window height during phpactor-status #124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,18 @@ You could for example limit yourself to only one by using [[https://github.com/m
("u" "Install" phpactor-install-or-update)]])
#+END_SRC

*** mini-buffer / echo area height
invoking `phpactor-status` will change the value of `max-mini-window-height`

Rationale: `phpactor-status` gives a quite long output, and some
part of it would be hidden in certain circumstances with emacs
default settings.

As `max-mini-window-height` is modified at a global level, this
might conflict with your settings. In that case, you could
customize `phpactor-status-output-height` to be equal to
`max-mini-window-height` (PR with a better solution also welcome)

** Troubleshooting

You can run ``phpactor-status`` while visiting a project file.
Expand Down
9 changes: 8 additions & 1 deletion phpactor.el
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,19 @@
(defcustom phpactor-install-directory
(eval-when-compile
(expand-file-name (locate-user-emacs-file "phpactor/")))
"Directory for setup Phactor. (default `~/.emacs.d/phpactor/')."
"Directory for setup Phpactor. (default `~/.emacs.d/phpactor/')."
:type 'directory)

(defcustom phpactor-use-native-json t
"If non-nil, use native json parsing if available."
:group 'phpactor
:type 'boolean)

(defcustom phpactor-status-output-height 18
"Custom value for 'max-mini-window-height', allowing phpactor-status to show its output completely."
:link '(variable-link max-mini-window-height)
:group 'phpactor
:type '(integer float))

;; Variables
;;;###autoload
Expand Down Expand Up @@ -659,6 +665,7 @@ function."
(defun phpactor-status ()
"Execute Phpactor RPC status command, and pop to buffer."
(interactive)
(setq max-mini-window-height phpactor-status-output-height)
(apply #'phpactor-action-dispatch (phpactor--rpc "status" [])))

;;;###autoload
Expand Down