-
Notifications
You must be signed in to change notification settings - Fork 185
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 group argument for LspGotoCommand #2031
Conversation
Thanks for feedback and suggestions! |
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.
It looks like the group
argument is ignored in
Line 1500 in ee8fc6e
def _open_uri_with_plugin_async( |
plugin/core/open.py
Outdated
if specified_group > -1: | ||
return False |
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.
What if the file is already open in the specified group? Then it should return True
I guess. That is what the former opens_in_desired_group
variable did.
plugin/core/open.py
Outdated
open_side_by_side = bool(flags & (sublime.ADD_TO_SELECTION | sublime.REPLACE_MRU)) | ||
if open_side_by_side: |
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.
This could be put directly into the if-condition without initializing a new variable for it. (Maybe with a comment which describes what is currently used as the variable name)
plugin/core/open.py
Outdated
file_in_active_group = open_file_group == active_group | ||
if file_in_active_group: |
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.
Same here.
plugin/core/open.py
Outdated
file_in_active_group = open_file_group == active_group | ||
if file_in_active_group: | ||
return True | ||
# Jump to the file if sublime.FORCE_GROUP is set |
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.
It should be "... is not set", right?
Hi @jwortmann, could you please elaborate what is required to change here ? |
eeb1472
to
b503072
Compare
The "Goto" commands call I think it should work if you do the same at Lines 1515 to 1516 in ee8fc6e
right before the call to new_file (possibly only if group > -1 ).
|
Thanks for detailed explanation, I've added the change. |
Is there particular reason why |
Hi @rchl, no particular reason. This was my first PR to the repo and was trying to keep it small and contained :) I can follow up with another PR to add group support for |
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 had some pending comments that I forgot to send. Sorry.
- Update the feature documentation - remove redundant variables - add group in is_enabled
e33159a
to
60d96ce
Compare
No worries! I've removed the redundant comments and ensure the sheet is closed when escape is pressed. |
Thanks. |
* main: Add group argument for LspGotoCommand (#2031) Add context menu entry in log panel for toggling lines limit (#2047) Automatically hide the diagnostics panel on save (#2037) Add support for triggerKind in code action requests (#2042) Custom context menu in log panel and "Clear log panel" item (#2045) Add icons and isPreferred support for code actions (#2040)
This PR will allow the user to pass a group for
Goto
commands.When the group is specified:
LocationPicker
.Relates to: #2022