Skip to content

Commit 45e36ce

Browse files
committed
Add an option to display the doc on the left.
Signed-off-by: Nikita Danilov <[email protected]>
1 parent 547cc35 commit 45e36ce

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

lsp-ui-doc.el

+9-1
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,12 @@ This affects the position of the documentation when
9898
(const :tag "At point" at-point))
9999
:group 'lsp-ui-doc)
100100

101+
(defcustom lsp-ui-doc-side 'right
102+
"Which side to display the doc."
103+
:type '(choice (const :tag "Left" left)
104+
(const :tag "Right" right))
105+
:group 'lsp-ui-doc)
106+
101107
(defcustom lsp-ui-doc-alignment 'frame
102108
"How to align the doc.
103109
This only takes effect when `lsp-ui-doc-position' is `top or `bottom."
@@ -545,7 +551,9 @@ FRAME just below the symbol at point."
545551
('window right)))
546552
((left . top) (if (eq lsp-ui-doc-position 'at-point)
547553
(lsp-ui-doc--mv-at-point width height left top)
548-
(cons (max (- frame-right width char-w) 10)
554+
(cons (pcase lsp-ui-doc-side
555+
('right (max (- frame-right width char-w) 10))
556+
('left 10))
549557
(pcase lsp-ui-doc-position
550558
('top (+ top char-w))
551559
('bottom (- (lsp-ui-doc--line-height 'mode-line)

0 commit comments

Comments
 (0)