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

Limit the width of the completer items #508

Merged
merged 1 commit into from
Feb 7, 2021
Merged

Conversation

krassowski
Copy link
Member

References

Fixes 13 from #495. The idea is that in extreme cases the completer covers the entire window width, which is annoying when someone has two files open side-by-side and looks at the other file, or has the context help open and wants to look at it; in other extreme cases the documentation panels get squished and is not usable.

Code changes

Added CSS only; sadly not scoped to LSP as we cannot modify the completer class easily (needs changes upstream).

User-facing changes

Before:
cycle-before

After:
cycle-after

  • when item is not active it is collapsed at 400px with ellipsis indicator
  • when item is active the completer gets expanded to a maximum of 600px
  • when it is not enough the line breaks and the label gets wrapped on spaces

I do not like the wrapping behaviour too much though (suggestions welcome!).

Backwards-incompatible changes

None

Chores

  • linted
  • tested
  • documented
  • changelog entry

@krassowski krassowski merged commit 1b1a5e7 into master Feb 7, 2021
@krassowski krassowski deleted the completion/width-limit branch February 16, 2021 23:22
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