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

[ST4] Add new context keys. #315

Merged
merged 2 commits into from
Nov 28, 2020

Conversation

UltraInstinct05
Copy link
Contributor

@UltraInstinct05 UltraInstinct05 commented Nov 17, 2020

This PR adds context keys that have been added in various builds of ST4 starting from 4050. The following table summarizes them

Key Operand Operators Match All Description Added in
"overlay_has_focus" boolean equality no Whether the overlay currently open, has focus. 4082
"overlay_name" string equality no The name of the overlay. Valid values are "goto" & "command_palette" 4082
"group_has_multiselect" boolean equality no Whether the currently focused group has multi selected tabs. 4050
"group_has_transient_sheet" boolean equality no Whether the currently focused group has a transient sheet. 4050
"has_snippet" boolean equality no Whether the immediate word before the cursor can be expanded to a snippet. 4050
"is_javadoc" boolean equality yes 4050

As to the is_javadoc one, I have no idea how to trigger it & what it does. So I have marked the details for it as a TODO.

This commit adds new context keys that have been introduced in the
various ST4 builds.
@keith-hall
Copy link
Member

Fwiw, your summary for has_snippet is incorrect, but you got it right in the completion file - just writing about it here in case anyone else is confused by that.
Thanks for this btw :)

@UltraInstinct05
Copy link
Contributor Author

Thanks. I'll edit & correct it.

This commit adds the new context keys to the syntax file for appropriate
highlighting.
@UltraInstinct05
Copy link
Contributor Author

I had forgotten to add these context keys to the syntax file for appropriate highlighting. I have made a commit that does so.

@FichteFoll
Copy link
Member

Thanks for the additions. Should perhaps also notify Will that these aren't in the ST4 docs either, if he's not aware of it already.

@FichteFoll FichteFoll merged commit b8fd402 into SublimeText:master Nov 28, 2020
@FichteFoll FichteFoll added this to the 3.3.0 milestone Nov 28, 2020
@UltraInstinct05 UltraInstinct05 deleted the add_new_context_keys branch November 28, 2020 13:21
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.

3 participants