Skip to content
Open
Changes from 1 commit
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
3 changes: 2 additions & 1 deletion lsp-ui-doc.el
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ This only takes effect when `lsp-ui-doc-position' is 'top or 'bottom."
:group 'lsp-ui-doc)

(defcustom lsp-ui-doc-max-width 150
"Maximum number of columns of the frame."
"Maximum number of columns of the frame or nil for ``frame-width''."
:type 'integer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should specify a type to nil too.

:group 'lsp-ui-doc)

Expand Down Expand Up @@ -411,6 +411,7 @@ We don't extract the string that `lps-line' is already displaying."
'lsp-ui-doc--webkit-resize-callback)

(let* ((frame-width (frame-width))
(lsp-ui-doc-max-width (or lsp-ui-doc-max-width frame-width))
(fill-column (min lsp-ui-doc-max-width (- frame-width 5))))
(when (> (lsp-ui-doc--buffer-width) (min lsp-ui-doc-max-width frame-width))
(lsp-ui-doc--with-buffer
Expand Down