Skip to content
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

add frame-left-or-right-other for lsp-ui-alignment #329

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JJPandari
Copy link

@JJPandari JJPandari commented Oct 24, 2019

I want lsp-ui-doc to not cover the code I'm currently editing, so I added an option frame-left-or-right-other to lsp-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 to window. 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.

@brotzeit brotzeit force-pushed the master branch 2 times, most recently from dfa421f to 134d9b7 Compare March 12, 2020 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant