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

Code Actions on save #1565

Open
archseer opened this issue Jan 23, 2022 Discussed in #1540 · 1 comment
Open

Code Actions on save #1565

archseer opened this issue Jan 23, 2022 Discussed in #1540 · 1 comment
Labels
A-language-server Area: Language server client C-enhancement Category: Improvements E-easy Call for participation: Experience needed to fix: Easy / not much

Comments

@archseer
Copy link
Member

Discussed in #1540

Originally posted by kevinsjoberg January 19, 2022
Helix currently supports running Code Actions manually by pressing <space>+a. Some language servers also supports running specific code actions on save, e.g., typescript-language-server and gopls.

Preferably, we extend the language server configuration to allow for specifying code actions to run on save. The actions themselves would then run asynchronously, similar to what we already do for auto formatting.

@archseer
Copy link
Member Author

The VSCode config seems to be:

"[go]": {
    "editor.codeActionsOnSave": {
        "source.organizeImports": true
    }
},

source.organizeImports and now source.sortImports (https://code.visualstudio.com/updates/v1_57#_sort-imports-source-action) seem to be the standardized name for this behavior and could be auto-enabled if the LSP offers them.

@kirawi kirawi added A-language-server Area: Language server client C-enhancement Category: Improvements labels Jan 23, 2022
@kirawi kirawi added the E-easy Call for participation: Experience needed to fix: Easy / not much label Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-language-server Area: Language server client C-enhancement Category: Improvements E-easy Call for participation: Experience needed to fix: Easy / not much
Projects
None yet
Development

No branches or pull requests

2 participants