Pass style with meta completion text #592
Open
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.
Hi there! I love ptpython, love that users can style it, and am hoping you'll consider a small PR to facilitate that.
There's currently no way to style the meta menu based on the type of completion. I personally find it much easier to read if the type is colored, but the completion element is always a consistent style, and this enables that. Here is an example:
This was achieved by setting styles like
keyword.builtin-meta
. Users who do not set these new styles will not see any change from their current experience, nor will users who do not use the multi-column setting and therefore don't see this text at all.(You can ignore the "class" and "function" types in the screenshot; I added some extra types that jedi returns beyond the three—builtin, param, keyword—that ptpython currently maps to. I have not included that change in this PR. I would be happy to submit another PR for that if it would be welcome.)
Thanks for considering!