Skip to content

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

Closed

Description

@roblourens

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"

Activity

  1. aiday-mar commented on Jan 19, 2024

    @aiday-mar
    Collaborator

    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 Matt Bierner (@mjbvz) ?

  2. justschen commented on Jan 19, 2024

    @justschen
    Collaborator

    Aiday Marlen Kyzy (@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.

  3. aiday-mar commented on Jan 19, 2024

    @aiday-mar
    Collaborator

    Hey Justin Chen (@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.

  4. justschen commented on Jan 22, 2024

    @justschen
    Collaborator

    Aiday Marlen Kyzy (@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).

  5. changed the title [-]There is no escape[/-] [+]lightbulb widget with `move symbol to` action covers code in python [/+] on Jan 22, 2024
  6. aiday-mar commented on Jan 22, 2024

    @aiday-mar
    Collaborator

    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.

  7. added
    bug
    editor-code-actions
    on Jan 29, 2024
  8. removed their assignment
    on Feb 21, 2024
  9. justschen commented on Jul 15, 2024

    @justschen
    Collaborator
  10. added
    verified
    on Jul 24, 2024
  11. locked and limited conversation to collaborators on Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugeditor-code-actionsverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions