add frame-left-or-right-other for lsp-ui-alignment #329
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I want lsp-ui-doc to not cover the code I'm currently editing, so I added an option
frame-left-or-right-other
tolsp-ui-alignment
, which checks whether the current window is relatively "left" or "right" in the frame (by looking at wether the center of the window is to the left or right of the frame).I also changed the placement of the top of the doc frame, to make it relative to window only when
...alignment
is set towindow
. Otherwise it's relative to the frame.During the change of the top position, I fixed a small bug, where the mode-line's Y coordinate is coded
(lsp-ui-doc--line-height 'mode-line)
, which is relative to window top, but not frame top. Now it's corrected to(+ (lsp-ui-doc--line-height 'mode-line) (- window-top-edge frame-top-edge))
And how about making this the default? It feels better to me than the default
frame
+top
.