-
Notifications
You must be signed in to change notification settings - Fork 184
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
fix: consider priority_selector when using best_session during rename #2538
Conversation
I think the correct way to fix this would be to pass the session name from Otherwise there might be only one of the servers having support for Passing the point to point = get_position(self.view, point=args.get('point'))
if not point:
return None though I see that in this PR it was just moved from one place to another.
Infinite loop from self reference detected. |
Good that someone still remembers what kind of utility functions we have :) Though in this case I think we should actually not return since the prepare rename request should not need the point. (Not that I ever see |
With the addition of |
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.
Though in this case I think we should actually not return since the prepare rename request should not need the point.
Not sure about that. Isn't the whole point of the prepare rename request to check whether a given location is valid to rename?
The control flow of the rename command is quite complicated, but I think here it probably doesn't matter because it would still return None because "placeholder" is not in args
, and then it will eventually return from run
if the point is None (which means that there is no cursor in the view).
plugin/rename.py
Outdated
if point is None: | ||
return None |
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.
Can be removed
Pass point to
best_session()
so thatpriority_selector
is respected.I've noticed that having LSP-some-sass and LSP-css running at once sends
prepareRename
to LSP-some-sass butrename
toLSP-css
.Having this fix +
prioriority_selector
defined in LSP-some-sass will fix the issue.Related to sublimelsp/LSP-some-sass#4