-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Rename the OpenFile
action to OpenSelectedFilename
to better reflect its function
#22494
base: main
Are you sure you want to change the base?
Conversation
This preserves the ability to refer to @mrnugget does this make sense to you? In #22250 a user was expecting the action to open a file picker, this is intended to prevent that kind of confusion. |
Rename makes sense to me! Added a comment about implementation particulars |
crates/editor/src/actions.rs
Outdated
@@ -391,3 +390,5 @@ gpui::actions!( | |||
action_as!(outline, ToggleOutline as Toggle); | |||
|
|||
action_as!(go_to_line, ToggleGoToLine as Toggle); | |||
|
|||
action_as!(editor, OpenSelectedFilename as [OpenFile]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's confusing to use as
for these two very different meanings. Not sure what to do instead though. Maybe just a new macro that takes a list of string aliases?
An alternative might also be to clarify that the purpose of these aliases is to not break user's configuration files. We may want to even deprecate them / auto-migrate configs off them to encourage homogeneity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the auto-migration idea!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed a fresh attempt, using deprecation metadata in the JSON Schema we provide for keymap files so that the language server will surface this information in a helpful way. Also renamed the macro. I did not try to implement auto-migration.
30299ed
to
202aefd
Compare
Release Notes:
OpenFile
action toOpenSelectedFilename
for clarity