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

make autofix configurable through in-editor configuration #2063

Merged
merged 1 commit into from
Nov 17, 2024

Conversation

Techatrix
Copy link
Member

@Techatrix Techatrix commented Oct 26, 2024

Some editors like VS Code and Sublime Text offer their own setting to configure code actions on save, editor.codeActionsOnSave and lsp_code_actions_on_save respectively. These options should be preferred over enable_autofix if possible. The enable_autofix gets renamed to force_autofix to reflect that it should only be used on editors that don't support code actions on save.
fixes #1093

List of editors that should be checked for the best way to implement autofix (code action on save or force_autofix):

  • VS Code ❎ with editor.codeActionsOnSave
  • Sublime Text LSP ❎ with lsp_code_actions_on_save
  • Zed Editor ❎ with code_actions_on_format (haven't checked whether it actually works)
  • ZigBrains ❌ (further research required)
  • Helix ❌ (possible with force_autofix but the ux is too bad)
  • nvim-lspconfig ❎ with vim.lsp.buf.code_action
  • CoC ❎ with CocAction
  • YouCompleteMe ❌ (wtf is this LSP client?)
  • Emacs eglot ❎ with eglot-code-action
  • Emacs lsp-mode ❌ (possible with force_autofix)
  • Kate ❌

How To Upgrade

Please checkout the Installation Guide and go to the documentation of your editor. Do not blindly change enable_autofix to force_autofix!

@Techatrix Techatrix force-pushed the techatrix/fixall-configuration branch 2 times, most recently from bbb731f to 1de821b Compare November 12, 2024 03:30
The `force_autofix` will not work on an editor that supports code actions.
@Techatrix Techatrix force-pushed the techatrix/fixall-configuration branch from 1de821b to 8d2baa5 Compare November 17, 2024 05:35
@Techatrix Techatrix marked this pull request as ready for review November 17, 2024 06:16
@Techatrix Techatrix merged commit 05ea40b into master Nov 17, 2024
6 checks passed
@Techatrix Techatrix deleted the techatrix/fixall-configuration branch November 17, 2024 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add better support for "source.fixAll"
1 participant