diff --git a/phpinspect-completion.el b/phpinspect-completion.el index 45d610b..69d1c23 100644 --- a/phpinspect-completion.el +++ b/phpinspect-completion.el @@ -255,7 +255,7 @@ Returns list of `phpinspect--completion'." (phpinspect--function-arguments completion-candidate) ", ") ") " - (phpinspect--format-type-name (phpinspect--function-return-type completion-candidate))) + (phpinspect--display-format-type-name (phpinspect--function-return-type completion-candidate))) :annotation (concat " " (phpinspect--type-bare-name (phpinspect--function-return-type completion-candidate))) @@ -266,7 +266,7 @@ Returns list of `phpinspect--completion'." ((completion-candidate phpinspect--variable)) (phpinspect--construct-completion :value (phpinspect--variable-name completion-candidate) - :meta (phpinspect--format-type-name + :meta (phpinspect--display-format-type-name (or (phpinspect--variable-type completion-candidate) phpinspect--null-type)) :target completion-candidate @@ -300,7 +300,7 @@ Returns list of `phpinspect--completion'." (dolist (comp completions) (setq completion (phpinspect--completion-list-get-metadata comp-list comp)) (push (list comp (phpinspect--prefix-for-completion completion) - (phpinspect--completion-meta completion)) + (concat " " (phpinspect--completion-meta completion))) affixated)) (nreverse affixated))) :exit-function diff --git a/phpinspect-eldoc.el b/phpinspect-eldoc.el index 1a24485..8208114 100644 --- a/phpinspect-eldoc.el +++ b/phpinspect-eldoc.el @@ -226,8 +226,7 @@ be implemented for return values of `phpinspect-eld-strategy-execute'") 'face 'font-lock-variable-name-face) phpinspect-eldoc-word-width) ": " - (propertize (phpinspect--display-format-type-name (phpinspect--variable-type var)) - 'face 'font-lock-type-face))) + (phpinspect--display-format-type-name (phpinspect--variable-type var)))) (cl-defstruct (phpinspect-function-doc (:constructor phpinspect-make-function-doc)) (fn nil @@ -256,9 +255,7 @@ be implemented for return values of `phpinspect-eld-strategy-execute'") (phpinspect--function-arguments fn) ", ") "): " - (propertize - (phpinspect--display-format-type-name (phpinspect--function-return-type fn)) - 'face 'font-lock-type-face)))) + (phpinspect--display-format-type-name (phpinspect--function-return-type fn))))) (defvar phpinspect-eldoc-strategies (list (phpinspect-make-eld-attribute) (phpinspect-make-eld-function-args) diff --git a/phpinspect-type.el b/phpinspect-type.el index dc55ae1..3f71637 100644 --- a/phpinspect-type.el +++ b/phpinspect-type.el @@ -216,13 +216,15 @@ NAMESPACE may be nil, or a string with a namespace FQN." (phpinspect--format-type-name (phpinspect--type-name type))) (cl-defmethod phpinspect--display-format-type-name ((name string)) - (phpinspect--format-type-name name)) + (propertize (phpinspect--format-type-name name) 'face 'font-lock-type-face)) (cl-defmethod phpinspect--display-format-type-name ((type phpinspect--type)) (let ((self (phpinspect--format-type-name type))) - (if (phpinspect--type-contains type) + (propertize + (if (phpinspect--type-contains type) (concat self "<" (phpinspect--format-type-name (phpinspect--type-contains type)) ">") - self))) + self) + 'face 'font-lock-type-face))) (cl-defstruct (phpinspect--function (:constructor phpinspect--make-function-generated) (:copier phpinspect--copy-function))