zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
48.95k stars 2.95k forks source link

Code Actions shortcuts #14470

Open ovidius72 opened 3 months ago

ovidius72 commented 3 months ago

Describe the feature

Please provide a way to assign shortcuts to individual code actions:

See also:

image

Thanks

notpeter commented 3 months ago

Are there other code actions beyond 'organize imports' that you'd like actions for that cannot be assigned to shortcuts? (Or is 'organize imports' distinct 'sort imports' in some way I don't understand?) Otherwise I think this is a duplicate of:

ovidius72 commented 3 months ago

Are there other code actions beyond 'organize imports' that you'd like actions for that cannot be assigned to shortcuts? (Or is 'organize imports' distinct 'sort imports' in some way I don't understand?) Otherwise I think this is a duplicate of:

There are other code actions other than Organize Imports.

Here is a screenshor for typescript react:

image

I think it would be good to be able to assign each of them to single shortcuts.

Or is 'organize imports' distinct 'sort imports' in some way I don't understand?

Organize imports, as far as I know, should run sort imports, remove unused imports and add all missing imports imports` in sequence.