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

lightbulb widget with move symbol to action covers code in python #202767

Closed
roblourens opened this issue Jan 18, 2024 · 6 comments
Closed

lightbulb widget with move symbol to action covers code in python #202767

roblourens opened this issue Jan 18, 2024 · 6 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug editor-code-actions Editor inplace actions (Ctrl + .) verified Verification succeeded
Milestone

Comments

@roblourens
Copy link
Member

Recording 2024-01-18 at 17 12 32

Is this right? Everywhere I go, a little icon is covering my code, I just want to read my code. The action in the light bulb is "move symbol to"

@aiday-mar
Copy link
Contributor

Hi @roblourens thank you for posting this issue. That's curious, I thought that TypeScript offers only Move to file and move to new file actions. I did a search for move symbol to in our repo and do not find results. Perhaps this is an action contributed by another extension @mjbvz ?

@justschen
Copy link
Contributor

@aiday-mar it might be contributed from python/pylance?

Maybe further discussion could having another setting (like onCode) which minimizes lightbulb being shown by only showing lightbulb for if there are more than a certain # of refactors (these code actions have the refactor type iirc) or if there are quick fixes? This way we're not just fixing in each extension, and it might be a more blanket approach. No real preference here, just want to throw some smol ideas out there.

@aiday-mar
Copy link
Contributor

Hey @justschen those are good ideas. Indeed on most cursor positions, there are code actions available in the lightbulb menu, so it appears very often. We can indeed decide to show the lightbulbs only if more than 'n' actions are available where 'n' could be defined by the user. The issue I see here is that we would need to define some sort of importance metric, so that importance code actions when present, always make the lightbulb appear. I also think that with this change it could be that the lightbulb does not show up in cases where the user would have expected it to.

@justschen
Copy link
Contributor

@aiday-mar that's a good point!

I know there is importance in certain contexts already:

  • in code actions: isPreferred (boolean) which is used in the context of quick fixable fixes
  • in diagnostics: severity (number)

both don't really help in this case since the code option appearing is basically the same move to actions that we wanted to not show everywhere, just contributed differently it seems. but definitely could field some discussion on other ways as well to improve visibility (maybe something like taking a look at max line/column length and showing the lightbulb at the end of line instead of above the cursor? just to chuck another idea out there).

@justschen justschen changed the title There is no escape lightbulb widget with move symbol to action covers code in python Jan 22, 2024
@aiday-mar
Copy link
Contributor

Agreed. For the move to action, I am working on a PR to make it appear less often. Perhaps here we should also track the extension which is contributing the code action and notify them that the code action appears too often.

@aiday-mar aiday-mar added bug Issue identified by VS Code Team member as probable bug editor-code-actions Editor inplace actions (Ctrl + .) labels Jan 29, 2024
@mjbvz mjbvz removed their assignment Feb 21, 2024
@justschen justschen modified the milestones: August 2024, July 2024 Jul 15, 2024
@justschen
Copy link
Contributor

fixed by #221419 and microsoft/TypeScript#58548

@roblourens roblourens added the verified Verification succeeded label Jul 24, 2024
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Aug 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug editor-code-actions Editor inplace actions (Ctrl + .) verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants