zed icon indicating copy to clipboard operation
zed copied to clipboard

Setting to turn off lightning bolt

Open albingroen opened this issue 2 years ago • 12 comments

Check for existing issues

  • [X] Completed

Is your feature request related to a problem?

I'm not keen on having lightning bolts everywhere in my code.

Describe the solution you'd like

A setting to turn off the lightning bolts on the start of lines.

If applicable, add mockups / screenshots to help present your vision of the feature

image

albingroen avatar Aug 16 '22 19:08 albingroen

The lightning bolt is used to signify that a code action can be ran (cmd-. to trigger). Disabling the lightning bolt would mean the user wouldn't know if there is a code action available or not - is that something you'd be ok with? Would there be a better way to show that an action is available, or would you simply not care that you wouldn't know? Just curious to hear your opinions.

JosephTLyons avatar Aug 16 '22 19:08 JosephTLyons

My workflow in my current editor (Neovim) is that I see a squiggly line under my code, and then I hit cmd+. to see the code actions. Isn't this flow pretty standard?

albingroen avatar Aug 16 '22 20:08 albingroen

VS Code and JetBrains' IDEs both produce a lightbulb, near the gutter, when an action is available - I'm guessing that might've been the inspiration behind the lightning bolt in Zed. I personally don't use Vim mode or any Vim editor, so I'm not familiar with any behavior of those editors.

image

JosephTLyons avatar Aug 16 '22 20:08 JosephTLyons

I see a squiggly line under my code, and then I hit cmd+. to see the code actions

In Zed, a squiggly line is already used to indicate an error or a warning, similar to VS Code or JetBrains IDEs. I would have thought that Neovim would use them that way too. The two concepts are related (because sometimes there are code actions for fixing an error), but not the same. Does the squiggly line actually indicate code actions in your Neovim setup?

maxbrunsfeld avatar Aug 16 '22 20:08 maxbrunsfeld

Zed image

Neovim image

albingroen avatar Aug 17 '22 04:08 albingroen

Ok, it looks like they use a ‘>>’ instead of a lightning bolt?

maxbrunsfeld avatar Aug 17 '22 04:08 maxbrunsfeld

Lightning bolt is fine.

ksandvik avatar Aug 17 '22 06:08 ksandvik

Ok, it looks like they use a ‘>>’ instead of a lightning bolt?

Yes, but only on lines where code actions are available. In zed it's basically on every line. That's my issue here. I just think a setting to turn that off would be nice 🙂

albingroen avatar Aug 17 '22 07:08 albingroen

VS Code and JetBrains' IDEs both produce a lightbulb, near the gutter, when an action is available

I hate that and got annoyed by the lightning bolt too. I think you should have a drawer where you list issues in the code and also quick actions.

danieltroger avatar Aug 17 '22 10:08 danieltroger

To chime in, I personally don't use code actions in my workflow often -- only for expanding match arms. Otherwise I resort to a linter :) so I don't quite have a use for the lightning bolt, and don't mind disabling it if it was an option

peterkos avatar Aug 21 '22 17:08 peterkos

+1 on this issue, most of the files in codebase have code action available ("organize imports") which I never want to do, but because code action is available, that bolt is following my cursor on each file on each line. I can be very distracting.

vaidotasp avatar Jan 26 '23 08:01 vaidotasp

With the work that has been done on https://github.com/zed-industries/zed/pull/7665, perhaps adding a setting for lightning bolt removal would be easier?

On the flip side, I've been working with Zed for a while now and I dont even notice it popping up on each line in typescript codebases.

vaidotasp avatar Feb 23 '24 12:02 vaidotasp

Turns out that pr did add it!

"gutter": {
    "code_actions": false
}

I think the issue can be closed @albingroen

bbb651 avatar Jul 24 '24 08:07 bbb651