golang/go

x/tools/gopls: 'fix all' code action for selected range

Open

#44.814 aperta il 5 mar 2021

Vedi su GitHub
 (0 commenti) (1 reazione) (0 assegnatari)Go (19.008 fork)batch import
FeatureRequestToolsgoplshelp wanted

Metriche repository

Star
 (133.883 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

This is a feature request. When working on typescript projects, I liked the 'fix all' code actions presented with other trivial code actions.

For example, consider this case:

Screen Shot 2021-03-05 at 11 57 02 AM

These are trivial ones and these quick fixes can be applicable on save if I had configured

        "editor.codeActionsOnSave": {
            "source.fixAll": true
        }

But, would be nice if I could select a region and trigger fix of all errors in the selected region. Or alternatively, like typescript or eslint extensions, present the fixAll (for the entire file) option using code action.

Guida contributor